Skip to content

Commit 366fb10

Browse files
authored
Merge pull request #7065 from alphagov/align-publish-config-with-recommendations
Align publish config with recommendations
2 parents e1d55f4 + d36e649 commit 366fb10

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/publish-to-npm.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-22.04
1919
environment: ${{ inputs.environment == 'production' && 'production' || null }}
2020
permissions:
21-
id-token: write
21+
id-token: write # Used when [generating provenance statements](https://docs.npmjs.com/generating-provenance-statements)
2222

2323
steps:
2424
- name: Checkout
@@ -29,6 +29,7 @@ jobs:
2929
with:
3030
node-version-file: .nvmrc
3131
registry-url: 'https://registry.npmjs.org'
32+
package-manager-cache: false # never use caching in release builds
3233

3334
- name: Install dependencies
3435
run: npm ci
@@ -58,6 +59,7 @@ jobs:
5859
path: ${{steps.pack.outputs.ARCHIVE_FILE_PATH}}
5960
archive: false # file is already compressed
6061

62+
# Publish the package using [trusted-publishing](https://docs.npmjs.com/trusted-publishers)
6163
- name: Publish to npm
6264
if: inputs.environment == 'production'
63-
run: npm publish --workspace govuk-frontend --provenance --tag ${{steps.generate_tag.outputs.NPM_TAG}}
65+
run: npm publish --workspace govuk-frontend --tag ${{steps.generate_tag.outputs.NPM_TAG}}

0 commit comments

Comments
 (0)