Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
on:
push:
branches: [main]
workflow_dispatch:
inputs:
tag:
description: "Existing release tag to publish, e.g. v2.0.0"
required: true

permissions:
contents: write
Expand All @@ -25,20 +30,23 @@
publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
if: ${{ needs.release-please.outputs.release_created || github.event_name == 'workflow_dispatch' }}
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.tag || github.sha }}
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
registry-url: "https://registry.npmjs.org"
# Trusted publishing allows only `npm stage publish`, which needs npm >= 11.15.0.
- run: npm install -g npm@11

Check warning on line 47 in .github/workflows/release-please.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Omitting "--ignore-scripts" allows lifecycle scripts to run during package installation.

See more on https://sonarcloud.io/project/issues?id=RobertLD_libscope&issues=AaEhp4kK6Za53JnjS8uv&open=AaEhp4kK6Za53JnjS8uv&pullRequest=525

Check warning on line 47 in .github/workflows/release-please.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Using dependencies without locking resolved versions is security-sensitive.

See more on https://sonarcloud.io/project/issues?id=RobertLD_libscope&issues=AaEhp4kK6Za53JnjS8uw&open=AaEhp4kK6Za53JnjS8uw&pullRequest=525
# tsc and npm publish load no native addon.
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Stages the release; a maintainer approves it on npmjs.com with 2FA.
- run: npm stage publish
Loading