-
Notifications
You must be signed in to change notification settings - Fork 0
feat: npm OIDC #73
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
feat: npm OIDC #73
Changes from all commits
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 | ||||
|---|---|---|---|---|---|---|
| @@ -1,36 +1,17 @@ | ||||||
| name: Bump, Release, and Publish | ||||||
| name: Publish to NPM | ||||||
|
|
||||||
| on: | ||||||
| workflow_call: | ||||||
| inputs: | ||||||
| newversion: | ||||||
| description: "Bump Type (major minor patch)" | ||||||
| default: "patch" | ||||||
| required: true | ||||||
| type: string | ||||||
| secrets: | ||||||
| VERSION_BUMP_TAG_TOKEN: | ||||||
| required: true | ||||||
| NPM_ACCESS_TOKEN: | ||||||
| required: true | ||||||
| push: | ||||||
| tags: | ||||||
| - "v*" | ||||||
|
|
||||||
| # Note: Use this for your workflow | ||||||
| # on: | ||||||
| # workflow_dispatch: | ||||||
| # inputs: | ||||||
| # newversion: | ||||||
| # description: "Bump Type (major minor patch)" | ||||||
| # required: true | ||||||
| # default: "patch" | ||||||
| # type: choice | ||||||
| # options: | ||||||
| # - patch | ||||||
| # - minor | ||||||
| # - major | ||||||
| permissions: | ||||||
| id-token: write | ||||||
| contents: read | ||||||
|
Comment on lines
+8
to
+10
|
||||||
|
|
||||||
| # concurrency: | ||||||
| # group: tag-and-release | ||||||
| # cancel-in-progress: true | ||||||
| concurrency: | ||||||
| group: npm-publish-${{ github.ref }} | ||||||
| cancel-in-progress: true | ||||||
|
|
||||||
| jobs: | ||||||
| lint: | ||||||
|
|
@@ -40,30 +21,24 @@ jobs: | |||||
| needs: lint | ||||||
| uses: prosegrinder/.github/.github/workflows/npm-test.yaml@main | ||||||
|
|
||||||
| build-publish-tag-release: | ||||||
| publish: | ||||||
| needs: test | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: "Checkout source code" | ||||||
| uses: "actions/checkout@v6" | ||||||
| uses: actions/checkout@v6 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
| token: ${{ secrets.VERSION_BUMP_TAG_TOKEN }} | ||||||
| - name: Setup Node.js | ||||||
| uses: actions/setup-node@v6.2.0 | ||||||
| uses: actions/setup-node@v6 | ||||||
|
||||||
| uses: actions/setup-node@v6 | |
| uses: actions/setup-node@v6.2.0 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,18 @@ | ||||||||||||||||
| name: Bump Version and Create Release | ||||||||||||||||
|
|
||||||||||||||||
| on: | ||||||||||||||||
| push: | ||||||||||||||||
| branches: | ||||||||||||||||
| - main | ||||||||||||||||
|
Comment on lines
+4
to
+6
|
||||||||||||||||
| push: | |
| branches: | |
| - main | |
| workflow_call: | |
| secrets: | |
| VERSION_BUMP_TAG_TOKEN: | |
| required: true |
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.
This workflow is no longer reusable: switching the trigger from
workflow_calltopushmeans downstream repos (and this repo’s ownworkflow-templates/npm-publish.yml) can’tuses: prosegrinder/.github/.github/workflows/npm-publish.yaml@...anymore. If the intent is to keep a reusable publish workflow, restoreon: workflow_call(with the required secrets/inputs) and put the tag-triggered “starter” workflow inworkflow-templates/instead (or publish both entrypoints).