ci: set up npm trusted publishing (OIDC)

This commit is contained in:
Paul Irish 2026-04-27 08:42:46 -07:00
parent aa19c34401
commit 3f6b498667
No known key found for this signature in database
2 changed files with 25 additions and 1 deletions

24
.github/workflows/publish.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Publish to npm
on:
workflow_dispatch: # Allow manual triggering
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read # Required for checkout
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.14.0
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
run: |
npm install -g npm@latest
npm publish --provenance --access public --registry https://registry.npmjs.org/

View file

@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/paulirish/git-recent.git"
"url": "https://github.com/paulirish/git-recent"
},
"keywords": [
"git",