Build 44: fix recurring macOS release build

release.yml's `files:` upload globs still used ${{ inputs.tag }}, which is empty
on a `release: published` event, so the auto-built macOS universal zip never
matched its filename and didn't attach — the job went green while uploading
nothing. Use the inputs.tag || release.tag_name fallback for the globs too.

Also fix the CI build number: building from the public single-commit squash
makes `git rev-list b51a46b..HEAD` fail (the fork base isn't an ancestor), so
build.rs fell back to "Build dev". build.rs now honours a GOBLIN_BUILD env
override and release.yml passes GOBLIN_BUILD=${TAG#build}, so CI artifacts carry
the real build number.
This commit is contained in:
2ro
2026-06-13 05:44:47 -04:00
parent f714e4498a
commit 143f4230c9
2 changed files with 30 additions and 17 deletions
+11 -8
View File
@@ -38,7 +38,8 @@ jobs:
ref: ${{ inputs.tag || github.event.release.tag_name }}
submodules: recursive
- name: Build
run: cargo build --release
shell: bash
run: GOBLIN_BUILD="${TAG#build}" cargo build --release
- name: Package
run: |
tar -C target/release -czf "goblin-$TAG-linux-x86_64.tar.gz" goblin
@@ -47,8 +48,8 @@ jobs:
with:
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
files: |
goblin-${{ inputs.tag }}-linux-x86_64.tar.gz
goblin-${{ inputs.tag }}-linux-x86_64-sha256sum.txt
goblin-${{ inputs.tag || github.event.release.tag_name }}-linux-x86_64.tar.gz
goblin-${{ inputs.tag || github.event.release.tag_name }}-linux-x86_64-sha256sum.txt
windows:
name: Windows x86_64 (MSVC)
@@ -61,7 +62,8 @@ jobs:
ref: ${{ inputs.tag || github.event.release.tag_name }}
submodules: recursive
- name: Build
run: cargo build --release
shell: bash
run: GOBLIN_BUILD="${TAG#build}" cargo build --release
- name: Package
shell: bash
run: |
@@ -71,8 +73,8 @@ jobs:
with:
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
files: |
goblin-${{ inputs.tag }}-win-x86_64.zip
goblin-${{ inputs.tag }}-win-x86_64-sha256sum.txt
goblin-${{ inputs.tag || github.event.release.tag_name }}-win-x86_64.zip
goblin-${{ inputs.tag || github.event.release.tag_name }}-win-x86_64-sha256sum.txt
macos:
name: macOS universal
@@ -84,6 +86,7 @@ jobs:
submodules: recursive
- name: Build both architectures
run: |
export GOBLIN_BUILD="${TAG#build}"
rustup target add aarch64-apple-darwin x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-apple-darwin
@@ -98,5 +101,5 @@ jobs:
with:
tag_name: ${{ inputs.tag || github.event.release.tag_name }}
files: |
goblin-${{ inputs.tag }}-macos-universal.zip
goblin-${{ inputs.tag }}-macos-universal-sha256sum.txt
goblin-${{ inputs.tag || github.event.release.tag_name }}-macos-universal.zip
goblin-${{ inputs.tag || github.event.release.tag_name }}-macos-universal-sha256sum.txt