Skip to content

Commit

Permalink
ci: Fix order in publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Jun 5, 2023
1 parent d2685a7 commit c23faad
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,6 @@ jobs:
node-version: 16.x
registry-url: https://registry.npmjs.org

- name: Build
run: npm run build

- name: Publish new version
# Note: Setting NODE_AUTH_TOKEN as job|workspace wide env var won't work
# as it appears actions/setup-node sets own value
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish

# Normally we have a guarantee that deps are already there, still it may not be the case when:
# - `master` build for same commit failed (and we still pushed tag manually)
# - We've pushed tag manually before `master` build finalized
Expand All @@ -52,6 +42,15 @@ jobs:
npm update --no-save
npm update --save-dev --no-save
- name: Build
run: npm run build

- name: Publish new version
# Note: Setting NODE_AUTH_TOKEN as job|workspace wide env var won't work
# as it appears actions/setup-node sets own value
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
- name: Publish release notes
run: |
TEMP_ARRAY=($(echo $GITHUB_REF | tr "/" "\n"))
Expand Down

0 comments on commit c23faad

Please sign in to comment.