Skip to content

Commit 43fcc5d

Browse files
committed
feat(npm): configure CI for NPM OIDC Tokens
1 parent e935d6a commit 43fcc5d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/push.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@ jobs:
66
npm-publish:
77
needs: unit-tests
88
if: github.ref == 'refs/heads/master' && needs.unit-tests.result == 'success'
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
10+
permissions:
11+
id-token: write
12+
contents: write
1013
steps:
1114
- uses: actions/checkout@v4
1215
- name: Install Node.js
1316
uses: actions/setup-node@v4
1417
with:
15-
node-version: 20.x
18+
node-version: 22.x
1619
- name: Run semantic-release
1720
env:
18-
GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
19-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022
run: >
21-
if [[ -n "$GH_TOKEN" && -n "$NPM_TOKEN" ]]; then
23+
if [[ "${{ github.repository_owner }}" == "pelias" ]]; then
2224
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash -
2325
fi
2426
build-docker-images:
2527
# run this job if the unit tests passed and the npm-publish job was a success or was skipped
2628
# note: github actions won't run a job if you don't call one of the status check functions, so `always()` is called since it evalutes to `true`
2729
if: ${{ always() && needs.unit-tests.result == 'success' && (needs.npm-publish.result == 'success' || needs.npm-publish.result == 'skipped') }}
2830
needs: [unit-tests, npm-publish]
29-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3032
steps:
3133
- uses: actions/checkout@v4
3234
- name: Build Docker images

0 commit comments

Comments
 (0)