Skip to content

Commit

Permalink
Add pragma to workflow to build artifacts even if no tag
Browse files Browse the repository at this point in the history
This will build all artifacts, but unless the commit is a tag,
it will not create a release or otherwise publish anything.

[artifacts]
[skip test]
  • Loading branch information
milesrichardson committed Mar 17, 2022
1 parent ce844c8 commit 2bf62d7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build_and_test_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ jobs:
# TODO figure out if we want to do poetry upload here (can only do once, so will fail
# if we're retrying an upload)
# "$HOME"/.poetry/bin/poetry build
- name: "Build wheel only (for debug)"
if: "contains(github.event.head_commit.message, '[debug wheel]')"
- name: "Build wheel only (do not configure publish)"
# The {windows,linux,osx}_binary stage will run if ref is tag, or msg contains "[artifacts]""
# If no tag, but [artifacts], we still need to build the wheel, but with NO_PUBLISH=1
# But if tag _and_ [artifacts], we want to skip this stage, to not build the wheel twice
if: "!startsWith(github.ref, 'refs/tags/') && contains(github.event.head_commit.message, '[artifacts]')"
env:
NO_PUBLISH: "1"
run: |
Expand All @@ -127,7 +130,7 @@ jobs:

windows_binary:
runs-on: windows-latest
if: "startsWith(github.ref, 'refs/tags/')"
if: "startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]')"
needs: build_and_test
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -156,7 +159,7 @@ jobs:

linux_binary:
runs-on: ubuntu-18.04
if: "startsWith(github.ref, 'refs/tags/')"
if: "startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]')"
needs: build_and_test
steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -194,8 +197,7 @@ jobs:

osx_binary:
runs-on: macOS-latest
# if: "startsWith(github.ref, 'refs/tags/')"
if: "contains(github.event.head_commit.message, '[test osx]')"
if: "startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[artifacts]')"
needs: build_and_test
steps:
- uses: actions/checkout@v1
Expand All @@ -219,9 +221,9 @@ jobs:
with:
name: sgr-osx
path: dist/sgr
- name: Build the multi-file binary
- name: Build the multi-file binary.gz
run: |
pyinstaller --clean --noconfirm --onedir splitgraph.osx.spec
pyinstaller --clean --noconfirm --onedir splitgraph.spec
dist/sgr-pkg/sgr --version
cd dist/sgr-pkg && tar zcvf ../sgr.tgz .
- name: Upload multi-file binary.gz as artifact
Expand Down

0 comments on commit 2bf62d7

Please sign in to comment.