Skip to content

Commit eb9e446

Browse files
committed
build: sets up publish.yml to handle Trusted Publishing and provenance (fallback)
1 parent 7bf1acd commit eb9e446

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ on:
1111
env:
1212
NODE_OPTIONS: --max_old_space_size=16384
1313

14+
permissions:
15+
id-token: write # Required for OIDC
16+
contents: read
17+
1418
jobs:
1519
build:
1620
# The type of runner that the job will run on
1721
runs-on: ubuntu-latest
1822

19-
# Environment variables available to all steps in the job to ensure provenance of the build
20-
permissions:
21-
contents: read
22-
id-token: write
23-
2423
# Steps represent a sequence of tasks that will be executed as part of the job
2524
steps:
2625
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -43,7 +42,9 @@ jobs:
4342
node-version-file: .nvmrc
4443
check-latest: true
4544
cache: 'npm'
46-
45+
registry-url: 'https://registry.npmjs.org'
46+
- name: Update npm
47+
run: npm install -g npm@latest
4748
- run: npm -v
4849
- run: npm install
4950

@@ -60,3 +61,4 @@ jobs:
6061
run: npm run lerna:publish
6162
env:
6263
NPM_TOKEN: ${{ secrets.UMBRACO_PUBLISH_NPM_TOKEN}}
64+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)