simplified build workflow

This commit is contained in:
Phred 2026-06-14 00:18:16 -05:00
parent f28ede7ae3
commit 4877990020
No known key found for this signature in database

View file

@ -36,7 +36,7 @@ on:
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release) # Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
concurrency: concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}" group: ${{ github.workflow }} @ ${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_type != 'tag' }} cancel-in-progress: ${{ github.ref_type != 'tag' }}
jobs: jobs:
@ -49,20 +49,22 @@ jobs:
steps: steps:
- name: "Configure" - name: "Configure"
env:
RESOLVED_SHA: >-
${{
case(
github.event_name == 'pull_reuqest',
github.event.pull_request.head.sha,
github.sha
)
}}
id: configure id: configure
shell: bash shell: bash
run: | run: |
tag_regex='^refs/tags/' if [[ "$GITHUB_REF_TYPE" == 'tag' ]]; then # release
if [[ $GITHUB_EVENT_NAME == pull-request ]]; then # pull request echo "tag=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
sha="${{github.event.pull_request.head.sha}}"
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
sha="$GITHUB_SHA"
tag="${GITHUB_REF/refs\/tags\//}"
echo "tag=$tag" >>"$GITHUB_OUTPUT"
else # push to branch
sha="$GITHUB_SHA"
fi fi
echo "sha=$sha" >>"$GITHUB_OUTPUT" echo "sha=$RESOLVED_SHA" >> "$GITHUB_OUTPUT"
- name: "Checkout" - name: "Checkout"
if: steps.configure.outputs.tag != null if: steps.configure.outputs.tag != null