fix: checkout branch ref to allow push back on pull_request events #92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Semantic Release | |
| on: | |
| push: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts # Download artifacts to this directory | |
| - name: Create package.json | |
| run: | | |
| echo '{"version": "1.0.0"}' > package.json | |
| - name: Install dependencies | |
| run: npm install --save-dev semantic-release @semantic-release/git @semantic-release/changelog | |
| # - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | |
| # run: npm audit signatures | |
| # Create a new release using the rules in .releaserc.yml | |
| - name: Release | |
| env: | |
| GH_TOKEN: ${{ secrets.V2BUILDTOKEN }} | |
| run: npx semantic-release | |
| #if: github.ref == 'refs/heads/main' |