Skip to content

Commit d12373f

Browse files
Chore/reapply OIDC (#5)
* chore: re-applying the change migrating to OIDC * chore: added ci.yaml to fern ignore
1 parent 3269987 commit d12373f

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.fernignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# Specify files that shouldn't be modified by Fern
2+
3+
.github/workflows/ci.yml

.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)