This repository was archived by the owner on Oct 29, 2025. It is now read-only.
chore: use npm trusted publishing with OIDC #18
Workflow file for this run
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
| name: release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| semver: | |
| description: 'The semver to use' | |
| required: true | |
| default: 'patch' | |
| type: choice | |
| options: | |
| - auto | |
| - patch | |
| - minor | |
| - major | |
| - prerelease | |
| - prepatch | |
| - preminor | |
| - premajor | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - uses: nearform-actions/optic-release-automation-action@a2785548e8bdafab7e628c2317b604278e460434 # v4.12.2 | |
| with: | |
| commit-message: 'Release {version}' | |
| sync-semver-tags: true | |
| access: 'public' | |
| # This prefix is added before the prerelease number, e.g. `v3.0.0-alpha.0` | |
| prerelease-prefix: 'alpha' | |
| semver: ${{ github.event.inputs.semver }} | |
| npm-tag: ${{ startsWith(github.event.inputs.semver, 'pre') && 'next' || 'latest' }} | |
| # Don't notify linked issues | |
| notify-linked-issues: false | |
| publish-mode: oidc | |
| build-command: | | |
| npm ci | |
| npm link | |
| npm run build |