Skip to content

Commit

Permalink
chore: tweak the release workflow
Browse files Browse the repository at this point in the history
It should be able to publish from master and main, plus checks if the build is up to date
  • Loading branch information
byCedric committed Jun 17, 2021
1 parent 6b8c488 commit 79ebfbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ jobs:
run: yarn clean
- name: Build package
run: yarn build
- name: Build up-to-date
run: git diff --stat --exit-code build
- name: Test-run release
if: success() && github.event.inputs.release != 'release'
run: yarn semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
if: success() && github.ref == 'refs/heads/main' && github.event.inputs.release == 'release'
if: success() && github.event.inputs.release == 'release' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 79ebfbc

Please sign in to comment.