mirror of
https://github.com/wp-statistics/GeoLite2-City.git
synced 2025-12-29 14:12:24 +00:00
Switch to npm trusted publishing (OIDC) - no tokens needed
- Add id-token: write permission for OIDC - Upgrade to Node.js 24 (npm 11.5.1+) - Use --provenance --access public for npm publish - Remove NPM_TOKEN dependency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
.github/workflows/update-database.yml
vendored
7
.github/workflows/update-database.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
id-token: write # Required for npm trusted publishing (OIDC)
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -21,7 +22,7 @@ jobs:
|
|||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '24' # Node 24 includes npm 11.5.1+ required for OIDC
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
- name: Download latest GeoLite2-City database
|
- name: Download latest GeoLite2-City database
|
||||||
@@ -97,9 +98,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Publish to npm
|
- name: Publish to npm
|
||||||
if: steps.check_changes.outputs.changed == 'true'
|
if: steps.check_changes.outputs.changed == 'true'
|
||||||
run: npm publish
|
run: npm publish --provenance --access public
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user