Skip to content

Commit f75fe3c

Browse files
committed
ci: Separate NPM upgrade from publish step
1 parent 59ba271 commit f75fe3c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
- name: Setup
4848
uses: ./.github/actions/setup
4949

50+
- name: Update NPM
51+
run: sudo npm i -g npm@latest
52+
5053
- name: Configure Git
5154
run: |
5255
git config user.name 'github-actions[bot]'
@@ -61,9 +64,7 @@ jobs:
6164
6265
- name: Publish to NPM
6366
working-directory: packages/${{ inputs.package }}
64-
run: |
65-
sudo npm i -g npm@latest
66-
npm publish
67+
run: npm publish
6768

6869
- name: Create GitHub release
6970
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}

.github/workflows/update-browser-package.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
with:
2424
installArgs: --ignore-scripts
2525

26+
- name: Update NPM
27+
run: sudo npm i -g npm@latest
28+
2629
- name: Generate Latest Code
2730
working-directory: packages/browser
2831
run: pnpm gen
@@ -42,6 +45,4 @@ jobs:
4245
- name: Publish Package
4346
if: steps.commit.outputs.changes_detected == 'true'
4447
working-directory: packages/browser
45-
run: |
46-
sudo npm i -g npm@latest
47-
npm publish
48+
run: npm publish

0 commit comments

Comments
 (0)