Skip to content

Commit

Permalink
Stop the "publish" action from running on snapshot builds
Browse files Browse the repository at this point in the history
  • Loading branch information
obra committed Aug 21, 2023
1 parent 48f1789 commit 5ccfc4e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16

- name: Set package version
shell: bash
run: echo "PACKAGE_VERSION=`npm pkg get version|tr -d '\"'`" >> $GITHUB_ENV

- name: Cancel job if the package version matches "-snapshot$"
uses: andymckay/[email protected]
# We only want to build master if we have a snapshot version
# ..otherwise, building main will clobber releases...sometimes
# due to a race condition.
if: ${{ endsWith( env.PACKAGE_VERSION, '-snapshot') }}

- name: Install the Apple certificate and provisioning profile
if: matrix.os == 'macos-latest' && startsWith(github.ref, 'refs/tags/')
env:
Expand Down

0 comments on commit 5ccfc4e

Please sign in to comment.