Skip to content

Commit 2abc65d

Browse files
authored
CI changes to support npmjs.com "trusted publisher" auth (#2668)
## Why is this change needed? Describe why this issue should be fixed and link to any relevant design docs, issues or other relevant items. ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [ ] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [ ] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [ ] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the CI workflow for package releases, including changes to permissions, Node.js version, and the `changesets/action` version, while also modifying the handling of NPM tokens. ### Detailed summary - Added permissions for `contents` and `id-token` in the workflow. - Updated `node-version` from `18` to `22.x`. - Set `registry-url` to `https://registry.npmjs.org`. - Upgraded `changesets/action` from `v1` to `v1.6.0`. - Changed `NPM_TOKEN` to an empty string. - Enabled `NPM_CONFIG_PROVENANCE`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 4415bec commit 2abc65d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.changeset/shaggy-bags-breathe.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@farcaster/core": patch
3+
"@farcaster/hub-nodejs": patch
4+
"@farcaster/hub-web": patch
5+
"@farcaster/shuttle": patch
6+
---
7+
8+
Test deploy with new CI auth method

.github/workflows/release-packages.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ concurrency:
99
jobs:
1010
release:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
id-token: write
1215
steps:
1316
- uses: actions/checkout@v4
1417

1518
- uses: actions/setup-node@v4
1619
with:
17-
node-version: '18'
20+
node-version: '22.x'
21+
registry-url: 'https://registry.npmjs.org'
1822

1923
- name: Restore cached dependencies for Node modules.
2024
id: module-cache
@@ -28,10 +32,11 @@ jobs:
2832

2933
- name: Create Release Pull Request or Publish to npm
3034
id: changesets
31-
uses: changesets/action@v1
35+
uses: changesets/action@v1.6.0
3236
with:
3337
publish: yarn release-packages
3438
version: yarn version-packages
3539
env:
3640
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
NPM_TOKEN: ''
42+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)