diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c047eb..a67f926 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,8 @@ name: Release # "v*" (e.g. v0.1.0) is created. on: push: - branches: - - main + tags: + - 'v*' # Releases need permissions to read and write the repository contents. # GitHub considers creating releases and uploading assets as writing contents. @@ -14,25 +14,7 @@ permissions: contents: write jobs: - determine_version_bump: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - outputs: - bump: ${{ steps.set-bump.outputs.bump }} - steps: - - name: Check PR for release tags - id: set-bump - run: | - if echo "${{ github.event.pull_request.labels.*.name }}" | grep -q "release:major"; then - echo "::set-output name=bump::major" - elif echo "${{ github.event.pull_request.labels.*.name }}" | grep -q "release:minor"; then - echo "::set-output name=bump::minor" - else - echo "::set-output name=bump::patch" - fi - goreleaser: - needs: [determine_version_bump] runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -57,15 +39,3 @@ jobs: # GitHub sets the GITHUB_TOKEN secret automatically. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - - release-on-push: - needs: [determine_version_bump] - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - id: release - uses: rymndhng/release-on-push-action@master - with: - bump_version_scheme: ${{ needs.determine_version_bump.outputs.bump }} - tag_prefix: v