chore: tweak the release workflow

It should be able to publish from master and main, plus checks if the build is up to date
This commit is contained in:
Cedric van Putten committed 2021-06-17 13:36:09 +02:00
1 parent 6b8c488fd6
commit 79ebfbc3b8
1 file changed
+3 -1
+3 -1
View File
@@ -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 }}