Skip to content

Commit

Permalink
added additional release steps
Browse files Browse the repository at this point in the history
  • Loading branch information
bryce-b committed Oct 29, 2024
1 parent 7933e49 commit 3aa948c
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ jobs:
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.RELEASE_TOKEN }}
branch: release/${{inputs.new_version}}
branch: release/v${{inputs.new_version}}
commit-message: 'Release v${{inputs.new_version}}'
title: 'Release v${{inputs.new_version}}'
delete-branch: true
body: >
This PR is auto-generated by
[create-pull-request](https://github.com/peter-evans/create-pull-request).
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/PR-Release-Warning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Warn Release Pull Requests
on:
pull_request:
branches:
- main
types:
- opened
jobs:
Check:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: check branch name
id: check-release
run: |
if [[ ${{ github.head_ref }} =~ ^release/(v[0-9]+\.[0-9]+\.[0-9]+$) ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: add comment if PR is release
if: steps.check-release.outputs.match == 'true'
uses: mshick/add-pr-comment@v2
with:
message: |
**WARNING** : This PR will trigger a release and tag when merged.
34 changes: 34 additions & 0 deletions .github/workflows/Tag-And-Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tag & Note Release
on :
pull_request:
branches:
- main
types:
- closed
jobs:
CheckRelease:
runs-on: ubuntu-latest
steps:
- name: Check if merge is release branch
id: check-release
run: |
if [[ ${{ github.head_ref }} =~ ^release/(v[0-9]+\.[0-9]+\.[0-9]+$) ]]; then
echo "match=true" >> $GITHUB_OUTPUT
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
fi
- name: Tag if release branch
if: github.event.pull_request.merged != true || steps.check-release.outputs.match != 'true'
run: exit 1
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: version bump to ${{ steps.check-release.outputs.version }}
tagging_message: 'v${{ steps.check-release.outputs.version }}'
- uses: ncipollo/release-action@v1
with:
tag: v${{ steps.check-release.outputs.version }}
prerelease: true
generateReleaseNotes: true
21 changes: 0 additions & 21 deletions .github/workflows/TagRelease.yml

This file was deleted.

0 comments on commit 3aa948c

Please sign in to comment.