Skip to content

Commit

Permalink
Merge pull request PelicanPlatform#1827 from jhiemstrawisc/match-rc-tags
Browse files Browse the repository at this point in the history
Trigger release actions if tag matches new `-rc.X` prerelease tags
  • Loading branch information
jhiemstrawisc authored Dec 18, 2024
2 parents 8a3db42 + b5da25c commit 70c9986
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/build-prod-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
tags:
# only run release on v7.0.0 and up
- v[7-9]\.[0-9]+\.[0-9]+
- v[7-9]\.[0-9]+\.[0-9]+-rc\.[0-9]+
- v[1-9][0-9]+\.[0-9]+\.[0-9]+
- v[1-9][0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+
repository_dispatch:
types:
- dispatch-build
Expand Down Expand Up @@ -92,7 +94,7 @@ jobs:
id: latest_version
run: |
git fetch --tags
tags=$(git tag -l 'v*.*.*' | sort -V)
tags=$(git tag -l 'v*.*.*' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V)
highest_tag=$(echo "${tags}" | tail -n1)
echo "Highest version tag is ${highest_tag}"
if [[ "${GITHUB_REF##*/}" == "${highest_tag}" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
push:
tags:
# only run release on v7.0.0 and up
# Match against v7.0.0, v7.0.0-rc.1, v7.0.0-rc.2, etc.
- v[7-9]\.[0-9]+\.[0-9]+
- v[7-9]\.[0-9]+\.[0-9]+-rc\.[0-9]+
- v[1-9][0-9]+\.[0-9]+\.[0-9]+
- v[1-9][0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+

permissions:
contents: write
Expand Down
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ nfpms:
- package_name: pelican
builds:
- pelican
# Note that git tags like v7.0.0-rc.1 will be modified by goreleaser when building
# rpms to be v7.0.0~rc.1-1. The tilde is a special character in RPM versioning that
# signifies some version substring should be sorted as less than the rest of the version,
# so that v7.0.0~rc.1-1 < v7.0.0-1.
file_name_template: "{{ .ConventionalFileName }}"
id: pelican
vendor: OSG Consortium
Expand Down

0 comments on commit 70c9986

Please sign in to comment.