-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from ALRhub/publish_from_release
Publish from release
- Loading branch information
Showing
3 changed files
with
33 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Ensure Tagged Commits on Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- release | ||
|
||
jobs: | ||
check_tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check if base commit of PR is tagged | ||
run: | | ||
BASE_COMMIT=$(jq -r .pull_request.base.sha < "$GITHUB_EVENT_PATH") | ||
TAG=$(git tag --contains $BASE_COMMIT) | ||
if [ -z "$TAG" ]; then | ||
echo "Base commit of PR is not tagged. PRs onto release must be tagged with the version number." | ||
exit 1 | ||
fi | ||
echo "Base commit of PR is tagged. Check passed." | ||
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 was deleted.
Oops, something went wrong.