Skip to content

Commit 137aed3

Browse files
committed
Standardize release artifact naming conventions
- Update CI workflows (`release-assets.yml`) to use explicit `asset_target` definitions for asset packaging. - Refactor build scripts and tasks to standardize artifact filenames, enforcing OS-before-arch order in all generated names. - Adjust validation and documentation scripts to consume the new standardized naming format.
1 parent 3873d99 commit 137aed3

4 files changed

Lines changed: 20 additions & 15 deletions

File tree

‎.github/workflows/release-assets.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,34 +35,39 @@ jobs:
3535
- name: Linux arm64
3636
runner: ubuntu-24.04-arm
3737
target: aarch64-unknown-linux-gnu
38+
asset_target: unknown-linux-gnu-aarch64
3839
archive_ext: tar.gz
3940
binary_name: commitbot
4041
install_cmd: ""
4142
linker: ""
4243
- name: Linux x86_64
4344
runner: ubuntu-24.04
4445
target: x86_64-unknown-linux-gnu
46+
asset_target: unknown-linux-gnu-x86_64
4547
archive_ext: tar.gz
4648
binary_name: commitbot
4749
install_cmd: ""
4850
linker: ""
4951
- name: Amazon Linux / CentOS / RHEL arm64
5052
runner: ubuntu-24.04-arm
5153
target: aarch64-unknown-linux-musl
54+
asset_target: unknown-linux-musl-aarch64
5255
archive_ext: tar.gz
5356
binary_name: commitbot
5457
install_cmd: sudo apt-get update && sudo apt-get install -y musl-tools
5558
linker: musl-gcc
5659
- name: Amazon Linux / CentOS / RHEL x86_64
5760
runner: ubuntu-24.04
5861
target: x86_64-unknown-linux-musl
62+
asset_target: unknown-linux-musl-x86_64
5963
archive_ext: tar.gz
6064
binary_name: commitbot
6165
install_cmd: sudo apt-get update && sudo apt-get install -y musl-tools
6266
linker: musl-gcc
6367
- name: Windows x86_64
6468
runner: ubuntu-24.04
6569
target: x86_64-pc-windows-gnu
70+
asset_target: pc-windows-gnu-x86_64
6671
archive_ext: zip
6772
binary_name: commitbot.exe
6873
install_cmd: sudo apt-get update && sudo apt-get install -y mingw-w64
@@ -113,7 +118,7 @@ jobs:
113118
shell: bash
114119
run: |
115120
set -euo pipefail
116-
asset="commitbot-${{ steps.meta.outputs.tag }}-${{ matrix.target }}.tar.gz"
121+
asset="commitbot-${{ steps.meta.outputs.tag }}-${{ matrix.asset_target }}.tar.gz"
117122
tar -C "target/${{ matrix.target }}/release" -czf "$asset" "${{ matrix.binary_name }}"
118123
echo "ASSET_PATH=$asset" >> "$GITHUB_ENV"
119124
@@ -122,7 +127,7 @@ jobs:
122127
shell: bash
123128
run: |
124129
set -euo pipefail
125-
asset="commitbot-${{ steps.meta.outputs.tag }}-${{ matrix.target }}.zip"
130+
asset="commitbot-${{ steps.meta.outputs.tag }}-${{ matrix.asset_target }}.zip"
126131
cd "target/${{ matrix.target }}/release"
127132
zip "../../../${asset}" "${{ matrix.binary_name }}"
128133
cd -

‎Taskfile.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ tasks:
9898
echo "Packaging into dist with version {{.VERSION}}..."
9999
100100
tar -C target/aarch64-apple-darwin/release \
101-
-czf dist/commitbot-{{.VERSION}}-aarch64-apple-darwin.tar.gz \
101+
-czf dist/commitbot-{{.VERSION}}-apple-darwin-aarch64.tar.gz \
102102
commitbot
103103
104104
tar -C target/x86_64-apple-darwin/release \
105-
-czf dist/commitbot-{{.VERSION}}-x86_64-apple-darwin.tar.gz \
105+
-czf dist/commitbot-{{.VERSION}}-apple-darwin-x86_64.tar.gz \
106106
commitbot
107107
108108
echo "Artifacts created:"

‎devops/publish-if-complete.sh‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ set -euo pipefail
55
TAG="${1:?usage: publish-if-complete.sh <tag>}"
66

77
EXPECTED=(
8-
"commitbot-${TAG}-aarch64-apple-darwin.tar.gz"
9-
"commitbot-${TAG}-x86_64-apple-darwin.tar.gz"
10-
"commitbot-${TAG}-aarch64-unknown-linux-gnu.tar.gz"
11-
"commitbot-${TAG}-x86_64-unknown-linux-gnu.tar.gz"
12-
"commitbot-${TAG}-aarch64-unknown-linux-musl.tar.gz"
13-
"commitbot-${TAG}-x86_64-unknown-linux-musl.tar.gz"
14-
"commitbot-${TAG}-x86_64-pc-windows-gnu.zip"
8+
"commitbot-${TAG}-apple-darwin-aarch64.tar.gz"
9+
"commitbot-${TAG}-apple-darwin-x86_64.tar.gz"
10+
"commitbot-${TAG}-unknown-linux-gnu-aarch64.tar.gz"
11+
"commitbot-${TAG}-unknown-linux-gnu-x86_64.tar.gz"
12+
"commitbot-${TAG}-unknown-linux-musl-aarch64.tar.gz"
13+
"commitbot-${TAG}-unknown-linux-musl-x86_64.tar.gz"
14+
"commitbot-${TAG}-pc-windows-gnu-x86_64.zip"
1515
)
1616

1717
ACTUAL="$(gh release view "${TAG}" --json assets --jq '[.assets[].name]')"

‎devops/render-release-notes.sh‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ cat <<EOF
1616
1717
| OS | arm64 | x86_64 |
1818
| --- | --- | --- |
19-
| macOS | [Download]($(asset_url "commitbot-${VERSION}-aarch64-apple-darwin.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-x86_64-apple-darwin.tar.gz")) |
20-
| Ubuntu* | [Download]($(asset_url "commitbot-${VERSION}-aarch64-unknown-linux-gnu.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-x86_64-unknown-linux-gnu.tar.gz")) |
21-
| RHEL** | [Download]($(asset_url "commitbot-${VERSION}-aarch64-unknown-linux-musl.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-x86_64-unknown-linux-musl.tar.gz")) |
22-
| Windows*** | — | [Download]($(asset_url "commitbot-${VERSION}-x86_64-pc-windows-gnu.zip")) |
19+
| macOS | [Download]($(asset_url "commitbot-${VERSION}-apple-darwin-aarch64.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-apple-darwin-x86_64.tar.gz")) |
20+
| Ubuntu* | [Download]($(asset_url "commitbot-${VERSION}-unknown-linux-gnu-aarch64.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-unknown-linux-gnu-x86_64.tar.gz")) |
21+
| RHEL** | [Download]($(asset_url "commitbot-${VERSION}-unknown-linux-musl-aarch64.tar.gz")) | [Download]($(asset_url "commitbot-${VERSION}-unknown-linux-musl-x86_64.tar.gz")) |
22+
| Windows*** | — | [Download]($(asset_url "commitbot-${VERSION}-pc-windows-gnu-x86_64.zip")) |
2323
2424
\* Ubuntu and compatible distributions like Debian, Mint, etc. that use glibc.
2525
\** RHEL and compatible distributions like Amazon, Rocky, etc. that use musl instead of glibc.

0 commit comments

Comments
 (0)