Merge pull request #7 from userbradley/dependabot/go_modules/src/gith… #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Tag & Release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- labeled | |
permissions: | |
pull-requests: write | |
contents: write | |
jobs: | |
comment-pr: | |
if: github.event.action == 'labeled' | |
runs-on: ubuntu-latest | |
name: Comment on PR the version to be released | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Post bumpr status comment | |
uses: haya14busa/action-bumpr@v1 | |
create-tag-and-release: | |
if: github.event.action != 'labeled' | |
runs-on: ubuntu-latest | |
name: Bump tag and cut release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bumpr Create Tag | |
id: bumpr | |
if: "!startsWith(github.ref, 'refs/tags/')" | |
uses: haya14busa/action-bumpr@v1 | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.bumpr.outputs.next_version }} | |
name: Version ${{ steps.bumpr.outputs.next_version }} | |
generate_release_notes: true | |
draft: false | |
prerelease: false |