Skip to content

Commit 2e4c647

Browse files
authored
chore(ci): Add trusted publishing (#1001)
1 parent a9ab4f6 commit 2e4c647

File tree

3 files changed

+12
-41
lines changed

3 files changed

+12
-41
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,25 @@ jobs:
1414
id-token: write
1515
contents: write
1616
steps:
17-
- name: Load secret
18-
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0
19-
with:
20-
# Export loaded secrets as environment variables
21-
export-env: true
22-
env:
23-
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
24-
# You may need to change this to your vault name and secret name
25-
# Refer to it by calling env.NPM_TOKEN
26-
# This token is also limited by IP to ONLY work on the runner
27-
NPM_TOKEN: op://npm-deploy/npm-runner-token/secret
17+
- uses: bullfrogsec/bullfrog@1831f79cce8ad602eef14d2163873f27081ebfb3 # v0.8.4
2818

2919
- name: Checkout
30-
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
20+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3121

3222
- name: Setup Node
33-
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7
23+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3424
with:
3525
cache: yarn
36-
node-version: 18
26+
node-version: 20
3727
registry-url: 'https://registry.npmjs.org'
3828

3929
- name: Install dependencies
4030
run: yarn install --immutable --immutable-cache
4131

32+
- name: Install npm
33+
run: npm install -g npm@latest
34+
4235
- name: Release
4336
env:
44-
NPM_CONFIG_USERCONFIG: /dev/null
45-
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
4637
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc && yarn publish
38+
run: yarn publish

.github/workflows/semgrep.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/tests.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ jobs:
1515
node: [ '10', '12', '14' ]
1616
name: Node ${{ matrix.node }}
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: bullfrogsec/bullfrog@1831f79cce8ad602eef14d2163873f27081ebfb3 # v0.8.4
19+
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1921
- name: Setup node
20-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1
2123
with:
2224
node-version: ${{ matrix.node }}
2325
- run: yarn install --frozen-lockfile

0 commit comments

Comments
 (0)