@@ -113,8 +113,11 @@ jobs:
113113 # TODO figure out if we want to do poetry upload here (can only do once, so will fail
114114 # if we're retrying an upload)
115115 # "$HOME"/.poetry/bin/poetry build
116- - name : " Build wheel only (for debug)"
117- if : " contains(github.event.head_commit.message, '[debug wheel]')"
116+ - name : " Build wheel only (do not configure publish)"
117+ # The {windows,linux,osx}_binary stage will run if ref is tag, or msg contains "[artifacts]""
118+ # If no tag, but [artifacts], we still need to build the wheel, but with NO_PUBLISH=1
119+ # But if tag _and_ [artifacts], we want to skip this stage, to not build the wheel twice
120+ if : " !startsWith(github.ref, 'refs/tags/') && contains(github.event.head_commit.message, '[artifacts]')"
118121 env :
119122 NO_PUBLISH : " 1"
120123 run : |
@@ -127,7 +130,7 @@ jobs:
127130
128131 windows_binary :
129132 runs-on : windows-latest
130- if : " startsWith(github.ref, 'refs/tags/')"
133+ if : " startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]') "
131134 needs : build_and_test
132135 steps :
133136 - uses : actions/checkout@v1
@@ -156,7 +159,7 @@ jobs:
156159
157160 linux_binary :
158161 runs-on : ubuntu-18.04
159- if : " startsWith(github.ref, 'refs/tags/')"
162+ if : " startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]') "
160163 needs : build_and_test
161164 steps :
162165 - uses : actions/checkout@v1
@@ -194,8 +197,7 @@ jobs:
194197
195198 osx_binary :
196199 runs-on : macOS-latest
197- # if: "startsWith(github.ref, 'refs/tags/')"
198- if : " contains(github.event.head_commit.message, '[test osx]')"
200+ if : " startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]')"
199201 needs : build_and_test
200202 steps :
201203 - uses : actions/checkout@v1
@@ -219,9 +221,9 @@ jobs:
219221 with :
220222 name : sgr-osx
221223 path : dist/sgr
222- - name : Build the multi-file binary
224+ - name : Build the multi-file binary.gz
223225 run : |
224- pyinstaller --clean --noconfirm --onedir splitgraph.osx. spec
226+ pyinstaller --clean --noconfirm --onedir splitgraph.spec
225227 dist/sgr-pkg/sgr --version
226228 cd dist/sgr-pkg && tar zcvf ../sgr.tgz .
227229 - name : Upload multi-file binary.gz as artifact
0 commit comments