diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 52d9ca8..3e6ce0e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,8 @@ name: release on: - push: + pull_request: + types: + - closed branches: - main @@ -12,6 +14,8 @@ env: jobs: release: + # Run if we have a label `release` on a merged PR + if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'pr-release') runs-on: ubuntu-latest steps: - name: Checkout @@ -34,8 +38,8 @@ jobs: - run: poetry install - name: Configure git run: | - git config --global user.name 'rbpatt2019' - git config --global user.email 'rbpatt2019@users.noreply.github.com' + git config --global user.name 'GitHub Actions' + git config --global user.email 'gha@prql-lang.org' - name: Python Semantic Release env: GH_TOKEN: ${{ inputs.gh_token }}