Skip to content

Commit

Permalink
Github release workflow setup
Browse files Browse the repository at this point in the history
  • Loading branch information
swapnil-musale committed Feb 19, 2024
1 parent bacded3 commit 3078e93
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Github Release

on:
pull_request:
types: [ opened, labeled, unlabeled ]

permissions:
contents: write

jobs:
validate-label:
name: Validate Label
runs-on: ubuntu-latest
steps:
- name: Exit if pull request does not have release label
if: contains(github.event.pull_request.labels.*.name, 'release')
run: exit -1

release:
needs: validate-label
name: Prepare Github Release
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
name: github.event.pull_request.labels[0].name
generate_release_notes: true
prerelease: false

0 comments on commit 3078e93

Please sign in to comment.