forked from longturn/freeciv21
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the AutoRevision update PR against the tagged branch
We need to update AutoRevision.txt in both the stable and master branches, so try to do that automatically.
- Loading branch information
Showing
2 changed files
with
13 additions
and
2 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 |
---|---|---|
|
@@ -13,11 +13,21 @@ jobs: | |
- 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. | ||
|