Skip to content

Commit

Permalink
Make the AutoRevision update PR against the tagged branch
Browse files Browse the repository at this point in the history
We need to update AutoRevision.txt in both the stable and master branches, so
try to do that automatically.
lmoureaux committed Feb 12, 2023
1 parent 6894c9d commit 602de7f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -10,14 +10,27 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- # Make sure there are no unstaged changes
# Was reporting changes to eol=crlf files in .gitattributes
run: git checkout -- .
- run: git rev-parse --short=5 HEAD > cmake/AutoRevision.txt
- run: git describe --tags `git rev-list --tags --max-count=1` >> cmake/AutoRevision.txt
- run: cat cmake/AutoRevision.txt
- name: Find target branch
id: branch
# We're running on a tag so have no direct access to the branch. Find it.
# Strip the first 3 components (ref/remotes/username)
run: |
git diff
branch=$(git branch -r --contains HEAD --format '%(refname:strip=3)')
echo Target branch is $branch
echo branch=$branch >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
base: ${{ steps.branch.outputs.branch }}
commit-message: "Release update of AutoRevision.txt"
branch: "release/autorevision"
branch: release/autorevision/${{ steps.branch.outputs.branch }}
title: "Release update of AutoRevision.txt"
body: >
Automatic changes triggered by a new release.

0 comments on commit 602de7f

Please sign in to comment.