diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e237262..2606f20 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,9 +1,13 @@ +# .github/workflows/release.yml name: Release on: push: branches: - main + pull_request: + branches: + - main permissions: contents: write @@ -11,9 +15,34 @@ permissions: issues: write jobs: + verify: + name: Verify semantic release + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install dependencies + run: npm ci + + - name: Verify semantic release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + npx semantic-release --dry-run + release: name: Release runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Checkout uses: actions/checkout@v4