mirror of
https://github.com/paulirish/git-recent.git
synced 2026-09-10 07:26:16 -04:00
ci: set up npm trusted publishing (OIDC)
This commit is contained in:
parent
aa19c34401
commit
3f6b498667
24
.github/workflows/publish.yml
vendored
Normal file
24
.github/workflows/publish.yml
vendored
Normal 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/
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue