diff --git a/.github/workflows/build-prod-container.yml b/.github/workflows/build-prod-container.yml index 3ce3c4dff..0a5138e84 100644 --- a/.github/workflows/build-prod-container.yml +++ b/.github/workflows/build-prod-container.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95e8b09aa..fda8a9201 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.goreleaser.yml b/.goreleaser.yml index cb6d6c905..60ecdad01 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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