diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index 3fa26a7..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Release Please - -on: - push: - branches: [main] - -jobs: - release-please: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: googleapis/release-please-action@v4 - with: - release-type: node diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66fa58c..e405cc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,31 @@ name: Release + on: push: - tags: ["v*"] + branches: [main] + workflow_dispatch: jobs: - publish: + release-please: + if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest permissions: contents: write + pull-requests: write + outputs: + releases_created: ${{ steps.release.outputs.releases_created }} + steps: + - uses: googleapis/release-please-action@v4 + id: release + with: + release-type: node + + publish: + needs: release-please + if: ${{ always() && (needs.release-please.outputs.releases_created == 'true' || github.event_name == 'workflow_dispatch') }} + runs-on: ubuntu-latest + permissions: + contents: read id-token: write steps: - uses: actions/checkout@v4