Release only from merged commits on main branch. (#20)

This commit is contained in:
Predrag Gruevski
2023-08-21 13:21:05 -04:00
committed by GitHub
parent 71b6f3fa8c
commit 3ff713763a
+3 -6
View File
@@ -1,9 +1,7 @@
name: release
on:
pull_request:
types:
- closed
push:
branches:
- main
paths:
@@ -15,9 +13,8 @@ env:
jobs:
if_release:
if: |
${{ github.event.pull_request.merged == true }}
&& ${{ contains(github.event.pull_request.labels.*.name, 'release') }}
# Disallow publishing from branches that aren't `main`.
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3