-
Notifications
You must be signed in to change notification settings - Fork 14
ci: Fix NPM publish workflow #297
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
Changes from all commits
1edae81
df8cd58
2078f91
bb23376
876bc2a
98523e1
65143d2
d88ea29
122409f
6ccf6b6
a7bb320
da4405a
62ad233
69bf4d8
ac4deb0
80df0c5
bab1242
e641ccd
123230e
2857d15
e167e9f
f375c50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Code owners are automatically requested to review when a pull request | ||
| # is opened (ready for review). | ||
| # See https://search.brave.com/search?q=About+code+owners+-+GitHub+Docs | ||
|
|
||
| # A Ruleset is created in this GitHub repository to automatically request | ||
| # Copilot's review when pull requests are created as drafts or when they | ||
| # are ready for review. | ||
| # See https://github.com/iExecBlockchainComputing/PoCo/settings/rules/9055086 | ||
|
|
||
| * @zguesmi @gfournieriExec @Le-Caignec | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,37 @@ | ||
| # ⚠️ THIS WORKFLOW IS THE TRUSTED PUBLISHER CONFIGURED ON NPMJS.COM, DO NOT RENAME OR DELETE THIS FILE ⚠️ | ||
|
|
||
| name: Publish NPM Package | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| id-token: write # Required for OIDC | ||
| packages: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-and-test: | ||
| pre-publish: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why set a particular name for this wf ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| uses: ./.github/workflows/main.yml | ||
|
|
||
| determine-dist-tag: | ||
| needs: pre-publish | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| TAG: ${{ steps.set-dist-tag.outputs.TAG }} | ||
| steps: | ||
| - name: Determine package dist tag | ||
| id: set-dist-tag | ||
| run: | | ||
| if [[ "${GITHUB_REF#refs/tags/}" == *"-rc"* ]]; then | ||
| echo "TAG=rc" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "TAG=latest" >> $GITHUB_OUTPUT | ||
| fi | ||
| publish: | ||
| needs: build-and-test | ||
| needs: determine-dist-tag | ||
| permissions: | ||
| id-token: write # Required for OIDC | ||
| packages: write | ||
| contents: read | ||
| uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-npm.yml@publish-npm-v1.6.0 | ||
| with: | ||
| tag: ${{ needs.determine-dist-tag.outputs.TAG }} | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.
The URL references a search engine query rather than directly linking to GitHub's official documentation. Consider using the direct documentation link:
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-ownersThere 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.
I used the search link because documentation link could change and it was too long but I can change it back.