Skip to content

Commit

Permalink
Updated build+release.yml to attempt fix for validate step matching tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmhouston authored May 14, 2024
1 parent 298342b commit 1bdff30
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build+release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
-project "${{ env.projectfile }}" -showBuildSettings \
| sed -nr 's/^.*MARKETING_VERSION = (.*)$/\1/p') 2>/dev/null
if [[ -z "${{ inputs.releaseVersion }}" ]] ; then
if [[ -z "${{ inputs.releaseVersion }}" -o "${{ inputs.releaseVersion }}" == "$version" ]] ; then
echo "- Build version is $version"
else
echo "- Build version is $version but overriding with ${{ inputs.releaseVersion }} for release & file names"
Expand All @@ -64,12 +64,14 @@ jobs:
releaseName="${{ env.productname }} $version"
echo "- Parsing trigger"
if [[ ${{ github.event_name }} == "workflow_dispatch" ]] && git show-ref --tags v$version --quiet ; then
tag="v$version"
echo "- Will build and draft release \"$releaseName\" with matching tag \"$tag\""
elif [[ ${{ github.event_name }} == "workflow_dispatch" ]] ; then
echo "- Will build and draft untagged release \"$releaseName\" because triggered manually and no tag \"v$version\" was found"
echo "::notice::Will skip notarizing and updating sparkle appcast"
if [[ ${{ github.event_name }} == "workflow_dispatch" ]] ; then
if git show-ref --tags v$version --quiet ; then
tag="v$version"
echo "- Will build and draft release \"$releaseName\" with matching tag \"$tag\""
else
echo "- Will build and draft untagged release \"$releaseName\" because triggered manually and no tag \"v$version\" was found"
echo "::notice::Will skip notarizing and updating sparkle appcast"
fi
elif [[ ${{ github.ref }} == 'refs/tags/'* ]] ; then
ref="${{ github.ref }}"
tag="${ref:10}" # magic number 10 being the length of "refs/tags/", stripping that to leave just the tag name
Expand Down

0 comments on commit 1bdff30

Please sign in to comment.