diff --git a/.github/workflows/branch-delete.yml b/.github/workflows/branch-delete.yml new file mode 100644 index 0000000..05d6b6f --- /dev/null +++ b/.github/workflows/branch-delete.yml @@ -0,0 +1,17 @@ +name: ❌ Branch Delete + +on: + pull_request: + types: + - closed + +jobs: + Delete-Branch: + runs-on: Ubuntu-Latest + + steps: + - name: ❌ Delete Branch + if: ${{ github.head_ref != 'dev'}} + uses: SvanBoxel/delete-merged-branch@1.4.3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index bf7c723..af7b143 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -23,5 +23,5 @@ jobs: steps: - name: 🚫 Base Branch is wrong - if: ${{ github.base_ref == 'main' && github.head_ref != 'dev' && !startsWith(github.base_ref, 'tagpr-from-') }} - run: echo "Base branch should be \`dev\`." && return 1 + if: ${{ github.base_ref == 'main' && github.head_ref != 'dev' }} + run: echo "Base branch should be \`dev\`." && exit 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d9368e..5a8f6f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,9 +3,10 @@ name: 🚀 Release on: push: branches: - - "dev" + - "main" permissions: + contents: write pull-requests: write jobs: