Skip to content

Commit

Permalink
fix workflow: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
wuttinanhi committed Nov 15, 2024
1 parent 1654d59 commit d86210e
Show file tree
Hide file tree
Showing 3 changed files with 175 additions and 2,207 deletions.
43 changes: 20 additions & 23 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package
name: Publish to NPM

on:
release:
types: [created]

workflow_dispatch:

jobs:
build:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 22.11.0

- run: npm ci

- run: npm test
version: 9
run_install: false

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.11.0
registry-url: https://registry.npmjs.org/

- run: npm ci

- run: npm publish
node-version: 22
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name : pnpm publish
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Loading

0 comments on commit d86210e

Please sign in to comment.