-
Notifications
You must be signed in to change notification settings - Fork 128
Add trusted publishing configuration #1273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,21 @@ | ||
| name: Build, Test, Release | ||
|
|
||
| # On pushes to master (i.e. merging a PR) | ||
| # run all tests, on win, macos, linux, on node 12 & 14 | ||
| # On pushes to main (i.e. merging a PR) | ||
| # run all tests, on Ubuntu Node 24 and release if tests pass | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - beta | ||
| - alpha | ||
| # Dont run if it's just markdown or doc files | ||
| - beta | ||
| paths-ignore: | ||
| # UNCOMMENT THIS AFTER | ||
| # - "**.md" | ||
| - "docs/**" | ||
| - "demos/**" | ||
| - "scripts/**" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # First, build and test on multiple os's | ||
| # and multuple versions of node | ||
|
|
@@ -24,12 +24,10 @@ jobs: | |
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| # PRs will run tests on node 14,16 on ubuntu, macos and windows | ||
| # so for the release, we're just running node 16@ubuntu | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| node: [18] | ||
| node: [24] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
@@ -54,7 +52,11 @@ jobs: | |
| name: Release | ||
| needs: [build_and_test] | ||
| runs-on: ubuntu-latest | ||
|
|
||
| permissions: | ||
| contents: write # to be able to publish a GitHub release | ||
| issues: write # to be able to comment on released issues | ||
| pull-requests: write # to be able to comment on released pull requests | ||
| id-token: write # to enable use of OIDC for trusted publishing and npm provenance | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
|
|
@@ -64,14 +66,10 @@ jobs: | |
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18 | ||
| node-version: 24 | ||
|
|
||
| - name: Configure npm | ||
| run: | | ||
| echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc | ||
| cat .npmrc | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| - name: Update NPM | ||
| run: npm install -g [email protected] | ||
patrickarlt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - name: Install | ||
| run: npm ci --legacy-peer-deps | ||
|
|
@@ -81,7 +79,5 @@ jobs: | |
|
|
||
| - name: Release | ||
| env: | ||
| # GH_TOKEN is maintained in the repository secrets. See RELEASE.md for more information. | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: npm run release | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we need to retroactively go through the other yml files and update them do remove legacy-peer-deps and update the node versions to 24 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dixonyant yes eventually we want to only be on LTS versions of Node in these tests but I wanted to make sure we were up to date here since have to use NPM 11.5.1