diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c9dd7d..374d8fa 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 @@ -22,11 +20,9 @@ jobs: - run: python generator.py - uses: actions/setup-node@v4 with: - node-version: 'lts' + node-version: 'lts/*' registry-url: 'https://registry.npmjs.org' - cache: 'npm' - 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')