Skip to content

Commit

Permalink
ci: fix publishing compatibility with npm
Browse files Browse the repository at this point in the history
- `MetaMask/action-npm-publish@v2` assumes yarn
- Specify `npm-publish` environment
- Bump `MetaMask/action-publish-release` from `v2` to `v3`
  • Loading branch information
legobeat committed Nov 20, 2023
1 parent 22df709 commit ea8cf49
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
publish-release:
environment: npm-publish
permissions:
contents: write
runs-on: ubuntu-latest
Expand All @@ -19,7 +20,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: MetaMask/action-publish-release@v2
- uses: MetaMask/action-publish-release@bc0d19824e88e009af68413d7fd01278f79436b8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install and build
Expand All @@ -28,11 +29,11 @@ jobs:
npm run build
- name: Dry Run Publish
# omit npm-token token to perform dry run publish
uses: MetaMask/action-npm-publish@v2
uses: MetaMask/action-npm-publish@v1.1.0
env:
SKIP_PREPACK: true
- name: Publish
uses: MetaMask/action-npm-publish@v2
uses: MetaMask/action-npm-publish@v1.1.0
with:
# This `NPM_TOKEN` needs to be manually set per-repository.
# Look in the repository settings under "Environments", and set this token in the `npm-publish` environment.
Expand Down

0 comments on commit ea8cf49

Please sign in to comment.