Skip to content

Commit 7f8134a

Browse files
sdirixlucas-koehler
authored andcommitted
dev: reverse push and publish operations
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.
1 parent b80191e commit 7f8134a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ jobs:
7777
git add -A && git commit --amend --no-edit
7878
git tag v${{ github.event.inputs.next_version }} -f
7979
80+
- name: "push"
81+
if: "github.event.inputs.skip_push == 'false'"
82+
run: |
83+
git push
84+
git push origin v${{ github.event.inputs.next_version }}
85+
8086
- name: "Publish to npm"
8187
if: "github.event.inputs.skip_publish == 'false'"
8288
run: "pnpm publish --recursive ${{ github.event.inputs.stable_release == 'true' && ' ' || '--tag next' }}"
8389
env:
8490
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
8591
NPM_CONFIG_PROVENANCE: "true"
86-
87-
- name: "push"
88-
if: "github.event.inputs.skip_push == 'false'"
89-
run: |
90-
git push
91-
git push origin v${{ github.event.inputs.next_version }}

0 commit comments

Comments
 (0)