Skip to content

Commit

Permalink
ci: update npm-publish workflow to use latest actions and Node.js ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
chessurisme committed Jan 27, 2025
1 parent 4c80fcd commit 2775caa
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install
- name: Configure Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm ci

- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 2775caa

Please sign in to comment.