diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b41e860..1628af7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,15 @@ jobs: needs: [test-and-build] runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/rc' + if: | + github.event_name == 'push' && + ( + github.ref == 'refs/heads/main' || + github.ref == 'refs/heads/beta' || + github.ref == 'refs/heads/alpha' || + github.ref == 'refs/heads/dev' || + github.ref == 'refs/heads/rc' + ) steps: - uses: actions/checkout@v4 with: @@ -57,15 +65,15 @@ jobs: - run: npm ci - run: npm run build - + - name: Setup Git identity run: | git config user.name "semantic-release-bot" git config user.email "semantic-release@github.com" - + - name: Run semantic-release run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}