diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index efde99e..c0fcb31 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,17 +1,12 @@ name: Publish to npmjs on: - workflow_run: - workflows: - - "Run Tests" - types: - - completed - branches: - - master + push: + tags: + - 'v*' jobs: publish: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref_type == 'tag' && github.ref == 'refs/heads/master' }} steps: - uses: actions/checkout@v4 - name: Use Node.js @@ -22,6 +17,8 @@ jobs: cache: 'npm' - name: Install dependencies run: npm ci --ignore-scripts + - name: Run tests + run: npm test - name: Build run: npm run build - name: Publish to npmjs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d99e1b..ace4859 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,10 @@ name: Run Tests -on: [push] +on: + push: + branches: + - '*' + tags-ignore: + - '*' jobs: test: