Skip to content

Commit

Permalink
dev: reverse push and publish operations
Browse files Browse the repository at this point in the history
In the publish workflow we first pushed the release to npm and then
pushed the commit to Github. If there was any error during pushing,
the published release would point to a non-existing commit. Therefore
these operations are now reversed so that this can not happen.
  • Loading branch information
sdirix committed Jan 24, 2024
1 parent d791185 commit 9201f79
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yaml
Expand Up @@ -77,15 +77,15 @@ jobs:
git add -A && git commit --amend --no-edit
git tag v${{ github.event.inputs.next_version }} -f
- name: "push"
if: "github.event.inputs.skip_push == 'false'"
run: |
git push
git push origin v${{ github.event.inputs.next_version }}
- name: "Publish to npm"
if: "github.event.inputs.skip_publish == 'false'"
run: "pnpm publish --recursive ${{ github.event.inputs.stable_release == 'true' && ' ' || '--tag next' }}"
env:
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
NPM_CONFIG_PROVENANCE: "true"

- name: "push"
if: "github.event.inputs.skip_push == 'false'"
run: |
git push
git push origin v${{ github.event.inputs.next_version }}

0 comments on commit 9201f79

Please sign in to comment.