-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
61 additions
and
22 deletions.
There are no files selected for viewing
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
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
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. |
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
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 |
This file was deleted.
Oops, something went wrong.