Skip to content

Commit c0d75f4

Browse files
committed
Split release publishing by platform
1 parent eee7bbc commit c0d75f4

6 files changed

Lines changed: 101 additions & 91 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Linux Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
uses: ./.github/workflows/release-reusable.yml
14+
with:
15+
runner: ubuntu-latest
16+
target: x86_64-unknown-linux-gnu
17+
archive_name: devloop-x86_64-unknown-linux-gnu.tar.gz
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: macOS Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
uses: ./.github/workflows/release-reusable.yml
14+
with:
15+
runner: macos-14
16+
target: aarch64-apple-darwin
17+
archive_name: devloop-aarch64-apple-darwin.tar.gz
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release Reusable
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
runner:
7+
required: true
8+
type: string
9+
target:
10+
required: true
11+
type: string
12+
archive_name:
13+
required: true
14+
type: string
15+
16+
permissions:
17+
contents: write
18+
19+
jobs:
20+
release:
21+
runs-on: ${{ inputs.runner }}
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v6
25+
26+
- name: Verify tag matches Cargo.toml version
27+
shell: bash
28+
run: |
29+
set -euo pipefail
30+
tag_version="${GITHUB_REF_NAME#v}"
31+
cargo_version="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n 1)"
32+
if [[ "${tag_version}" != "${cargo_version}" ]]; then
33+
echo "tag version ${tag_version} does not match Cargo.toml version ${cargo_version}" >&2
34+
exit 1
35+
fi
36+
37+
- name: Install Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ inputs.target }}
41+
42+
- name: Cache cargo artifacts
43+
uses: Swatinem/rust-cache@v2
44+
45+
- name: Build release binary
46+
run: cargo build --release --target ${{ inputs.target }}
47+
48+
- name: Package release archive
49+
shell: bash
50+
run: |
51+
set -euo pipefail
52+
mkdir -p dist
53+
cp "target/${{ inputs.target }}/release/devloop" dist/devloop
54+
tar -C dist -czf "${{ inputs.archive_name }}" devloop
55+
56+
- name: Publish GitHub release asset
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
files: ${{ inputs.archive_name }}
60+
generate_release_notes: true
61+
fail_on_unmatched_files: true

.github/workflows/release.yml

Lines changed: 0 additions & 91 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ All notable changes to `devloop` will be recorded in this file.
2525
- Split Linux and macOS CI into separate badgeable workflows backed by
2626
one reusable workflow definition, and limited release archives to the
2727
supported Linux x86_64 and macOS Apple Silicon targets.
28+
- Split release publishing into separate Linux and macOS workflows
29+
backed by one reusable workflow definition so each platform publishes
30+
its asset independently.
2831

2932
## [0.6.1] - 2026-03-26
3033

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ cargo install --git https://github.com/pasunboneleve/devloop.git
5050

5151
Tagged releases are also published automatically on GitHub with
5252
prebuilt release archives for Linux x86_64 and macOS Apple Silicon.
53+
Each supported platform publishes its release asset independently, so a
54+
failure on one platform does not block the other asset from being
55+
attached to the GitHub release.
5356

5457
Supported prebuilt release targets:
5558

0 commit comments

Comments
 (0)