Skip to content

Commit bf58b3c

Browse files
authored
ci(publish): use trusted publishing (#2573)
1 parent e23157e commit bf58b3c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ jobs:
633633
release:
634634
permissions:
635635
contents: write # create releases (Nx Release)
636-
id-token: write # enable use of OIDC for npm provenance (Nx Release)
636+
id-token: write # enable use of OIDC for trusted publishing
637637
needs:
638638
- review
639639
- ios
@@ -663,12 +663,16 @@ jobs:
663663
if: ${{ github.ref != 'refs/heads/trunk' }}
664664
run: |
665665
yarn nx release --dry-run
666+
- name: Update npm if <11.5.1
667+
run: |
668+
if [[ "$(echo -e "11.5.1\n$(npm --version)" | sort --version-sort | head -n 1)" != "11.5.1" ]]; then
669+
npm install -g [email protected]
670+
fi
671+
echo "npm version: $(npm --version)"
666672
- name: Release
667673
if: ${{ github.ref == 'refs/heads/trunk' }}
668674
env:
669675
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
670-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
671-
NPM_CONFIG_PROVENANCE: true
672676
run: |
673677
git fetch origin trunk
674678
if git merge-base --is-ancestor origin/trunk HEAD; then

0 commit comments

Comments
 (0)