From ba3839dd7a93471921b0180c12fedf03bab63639 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 11 Apr 2024 19:40:21 -0400 Subject: [PATCH 1/2] fix node-version --- .github/workflows/release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52fcad6..487a217 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,6 @@ name: Publish Package to npmjs on: push: pull_request: - release: - types: [created] jobs: build: runs-on: ubuntu-latest @@ -21,10 +19,9 @@ jobs: - run: python generator.py - uses: actions/setup-node@v4 with: - node-version: 'lts' + node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' - if: github.event_name == 'release' - run: npm publish --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - if: github.event_name == 'release' + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') From b1b73217704b653b15901981a5f6eaa359f2dc59 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 11 Apr 2024 19:46:09 -0400 Subject: [PATCH 2/2] remove cache --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cdec959..374d8fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,6 @@ jobs: with: node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' - cache: 'npm' - run: npm publish --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}