Skip to content

Commit 8745bb6

Browse files
committed
ci: migrate to trusted publishing
1 parent 5043f3e commit 8745bb6

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
if: ${{ always() && !failure() && !cancelled() }}
8080
needs: [test, check-beachball-changefile]
8181
runs-on: ubuntu-latest
82+
permissions:
83+
id-token: write
84+
contents: read
8285
steps:
8386
- uses: actions/checkout@v4
8487
- uses: pnpm/action-setup@v4
@@ -93,20 +96,14 @@ jobs:
9396

9497
- name: Publish (development)
9598
if: github.repository == 'RightCapitalHQ/phpdoc-parser' && github.base_ref == github.event.repository.default_branch
96-
env:
97-
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
9899
run: |
99-
npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}"
100100
preid="${HEAD_REF//\//-}".${{ github.run_number }}.${{ github.run_attempt }}
101101
npm --no-git-tag-version version prerelease --preid="${preid}"
102102
pnpm publish --no-git-checks --access public --tag development
103103
104104
- name: Publish (main)
105105
if: github.repository == 'RightCapitalHQ/phpdoc-parser' && github.ref_name == github.event.repository.default_branch
106-
env:
107-
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
108106
run: |
109-
npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}"
110107
git config --local user.email "npm-publisher@rightcapital.com"
111108
git config --local user.name "GitHub Actions[bot]"
112109
pnpm beachball publish --access public --yes -m 'chore(release): applying package updates'

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.17.1
1+
24.10.0

0 commit comments

Comments
 (0)