diff --git a/.github/workflows/cleanup-release-branch.yml b/.github/workflows/cleanup-release-branch.yml new file mode 100644 index 0000000..c7bdd84 --- /dev/null +++ b/.github/workflows/cleanup-release-branch.yml @@ -0,0 +1,19 @@ +name: Cleanup release branch + +on: + push: + branches: + - 'master' + +permissions: + contents: write + +jobs: + cleanup: + if: ${{ github.event.head_commit.message == 'cleanup release branch' }} + runs-on: ubuntu-latest + steps: + - name: Delete test release branch + env: + GH_TOKEN: ${{ github.token }} + run: gh api -X DELETE "repos/${GITHUB_REPOSITORY}/git/refs/heads/test%2Frelease-v1.0.0"