Skip to content

Commit

Permalink
Attempt to limit release to push on main branch
Browse files Browse the repository at this point in the history
Relates to #51.
  • Loading branch information
jschaf committed Feb 5, 2022
1 parent 7f87888 commit 43bad01
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Release
on:
push:
branches: [main]
workflow_run:
workflows: ["Test"]
branches: [main]
types:
- completed
types: [completed]
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' && github.repository_owner == 'jschaf' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -17,4 +18,4 @@ jobs:
- name: Create release
run: make release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

0 comments on commit 43bad01

Please sign in to comment.