Skip to content

Commit 4b78c1d

Browse files
chore: migrating to OIDC (#4)
* chore: OIDC support * fix * fix: lts * chore: remove the version bump
1 parent 6408d39 commit 4b78c1d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,31 @@ jobs:
3333
needs: [ compile, test ]
3434
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
3535
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write # for pushing tags
38+
id-token: write # required for OIDC
3639
steps:
3740
- name: Checkout repo
38-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
3942
- name: Set up node
40-
uses: actions/setup-node@v3
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: lts/*
46+
registry-url: 'https://registry.npmjs.org'
47+
cache: npm
48+
- name: Update npm
49+
run: npm install -g npm@latest # Ensure npm 11.5.1 or later is installed for OIDC support
4150
- name: Install dependencies
4251
run: yarn install
4352
- name: Build
4453
run: yarn build
4554

4655
- name: Publish to npm
4756
run: |
48-
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
4957
if [[ ${GITHUB_REF} == *alpha* ]]; then
5058
npm publish --access public --tag alpha
5159
elif [[ ${GITHUB_REF} == *beta* ]]; then
5260
npm publish --access public --tag beta
5361
else
5462
npm publish --access public
55-
fi
56-
env:
57-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
63+
fi

0 commit comments

Comments
 (0)