Skip to content

Commit 7f3fd6e

Browse files
authored
chore: adds release environment to npm publish workflow (#248)
NPM package publishing will be migrated to use Trusted Publishing (via OIDC). To ensure security and restrict access, we will configure the OIDC token request to only be available to jobs running in the dedicated 'release' environment. This environment will be a required condition for obtaining the necessary NPM token.
1 parent a088bb7 commit 7f3fd6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/publish-frontend.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
jobs:
1010
publish:
1111
if: startsWith(github.ref, 'refs/tags/frontend/@dfinity/vetkeys/')
12+
environment: release
1213
runs-on: ubuntu-latest
1314
permissions:
1415
contents: read
@@ -42,11 +43,11 @@ jobs:
4243
exit 1
4344
fi
4445
- run: |
45-
npm install
46+
npm ci
4647
cd frontend/ic_vetkeys
4748
npm list
4849
npm run build
4950
npm audit
5051
npm publish --provenance --access public
5152
env:
52-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)