Skip to content

Commit 8bf7d7a

Browse files
committed
cargo-rail: audited readme, docs, commands, and config; looks decent. added 'release check' improvements. added pre-built binaries to release.yaml
1 parent 8a4685f commit 8bf7d7a

File tree

164 files changed

+2704
-5485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2704
-5485
lines changed

.github/actions-lock.yaml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,36 +26,54 @@
2626
actions/checkout:
2727
ref: v5.0.0
2828
sha: "08c6903cd8c0fde910a37f88322edcfb5dd907a8"
29-
updated: "2025-11-27T15:46:14Z"
29+
updated: "2025-12-04T18:53:24Z"
3030
notes: "Repository checkout - used in every workflow"
3131
actions/upload-artifact:
3232
ref: v5.0.0
3333
sha: "330a01c490aca151604b8cf639adc76d48f6c5d4"
34-
updated: "2025-11-27T15:46:15Z"
34+
updated: "2025-12-04T18:53:25Z"
3535
notes: "Upload build artifacts and test results"
3636
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3737
# Testing & Reporting
3838
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3939
mikepenz/action-junit-report:
4040
ref: v6.0.1
4141
sha: "e08919a3b1fb83a78393dfb775a9c37f17d8eea6"
42-
updated: "2025-11-27T15:46:16Z"
42+
updated: "2025-12-04T18:53:26Z"
4343
notes: "Publish JUnit test reports as GitHub Checks"
4444
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4545
# Rust Toolchain & Ecosystem
4646
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4747
dtolnay/rust-toolchain:
4848
ref: master
4949
sha: "0b1efabc08b657293548b77fb76cc02d26091c7e"
50-
updated: "2025-11-27T15:46:17Z"
50+
updated: "2025-12-04T18:53:26Z"
5151
notes: "Rust toolchain installation - always tracks latest nightly"
5252
taiki-e/install-action:
5353
ref: v2
54-
sha: "1ee706eb04986370fc60419ba172594c51067f29"
55-
updated: "2025-11-27T15:46:17Z"
54+
sha: "493d7f216ecab2af0602481ce809ab2c72836fa1"
55+
updated: "2025-12-04T18:53:27Z"
5656
notes: "Install cargo tools (nextest, just, deny, audit)"
5757
Swatinem/rust-cache:
5858
ref: v2.8.1
5959
sha: "f13886b937689c021905a6b90929199931d60db1"
60-
updated: "2025-11-27T15:46:18Z"
60+
updated: "2025-12-04T18:53:28Z"
6161
notes: "GitHub runner Rust cache"
62+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63+
# Release Workflow Actions
64+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65+
taiki-e/create-gh-release-action:
66+
ref: v1.8.4
67+
sha: "b7abb0cf5e72cb5500307b577f9ca3fd4c5be9d2"
68+
updated: "2025-12-04T18:53:29Z"
69+
notes: "Create GitHub releases from CHANGELOG.md"
70+
taiki-e/setup-cross-toolchain-action:
71+
ref: v1.26.0
72+
sha: "bdeb9ca6f0f909ea36bb94e1e3ec916b2ceb35fc"
73+
updated: "2025-12-04T18:53:29Z"
74+
notes: "Cross-compilation toolchain setup for multi-target builds"
75+
taiki-e/upload-rust-binary-action:
76+
ref: v1.24.0
77+
sha: "e7953b6078194a4ae5f5619632e3715db6275561"
78+
updated: "2025-12-04T18:53:30Z"
79+
notes: "Build and upload pre-built binaries to GitHub Releases"

.github/actions/affected/action.yaml

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

.github/actions/setup/action.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@ runs:
1515
# Install cargo tools FIRST, before Rust toolchain installation
1616
# This prevents Windows issues where massive toolchain updates interfere with cargo bin directory
1717
- name: Install just
18-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
18+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
1919
with:
2020
tool: just
2121

2222
- name: Install cargo-nextest
23-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
23+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
2424
with:
2525
tool: cargo-nextest
2626

2727
- name: Install cargo-deny
28-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
28+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
2929
with:
3030
tool: cargo-deny
3131

3232
- name: Install cargo-audit
33-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
33+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
3434
with:
3535
tool: cargo-audit
3636

3737
- name: Install cargo-semver-checks
38-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
38+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
3939
with:
4040
tool: cargo-semver-checks
4141

4242
- name: Install git-cliff
43-
uses: taiki-e/install-action@1ee706eb04986370fc60419ba172594c51067f29 # v2
43+
uses: taiki-e/install-action@493d7f216ecab2af0602481ce809ab2c72836fa1 # v2
4444
with:
4545
tool: git-cliff
4646

.github/workflows/release.yaml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# Release workflow for cargo-rail
2+
#
3+
# Triggered by pushing a version tag (v1.0.0, v1.2.3, etc.)
4+
#
5+
# This workflow:
6+
# 1. Creates a GitHub Release with CHANGELOG content
7+
# 2. Builds pre-built binaries for 9 targets
8+
# 3. Uploads binaries to the release
9+
#
10+
# The actual version bump, changelog generation, and tagging is done locally
11+
# using `cargo rail release run cargo-rail --bump <version>`.
12+
#
13+
# Workflow:
14+
# LOCAL: cargo rail release run cargo-rail --bump 1.0.0
15+
# git push origin main --follow-tags
16+
# CI: This workflow triggers, builds binaries, creates release
17+
18+
name: Release
19+
20+
permissions:
21+
contents: read
22+
23+
on:
24+
push:
25+
tags:
26+
- v[0-9]+.*
27+
28+
env:
29+
CARGO_INCREMENTAL: 0
30+
CARGO_TERM_COLOR: always
31+
RUST_BACKTRACE: 1
32+
33+
jobs:
34+
# ==========================================================================
35+
# Job 1: Create GitHub Release
36+
# ==========================================================================
37+
create-release:
38+
name: Create Release
39+
runs-on: ubuntu-latest
40+
permissions:
41+
contents: write
42+
outputs:
43+
version: ${{ steps.version.outputs.version }}
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
47+
with:
48+
persist-credentials: false
49+
50+
- name: Extract version from tag
51+
id: version
52+
run: echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"
53+
54+
- name: Create GitHub Release
55+
uses: taiki-e/create-gh-release-action@b7abb0cf5e72cb5500307b577f9ca3fd4c5be9d2 # v1.8.4
56+
with:
57+
changelog: CHANGELOG.md
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
# ==========================================================================
61+
# Job 2: Build and upload pre-built binaries
62+
# ==========================================================================
63+
upload-assets:
64+
name: Build (${{ matrix.target }})
65+
needs: create-release
66+
strategy:
67+
fail-fast: false
68+
matrix:
69+
include:
70+
# ----------------------------------------------------------------
71+
# Linux
72+
# ----------------------------------------------------------------
73+
# x86_64 glibc - most common Linux target
74+
- target: x86_64-unknown-linux-gnu
75+
os: ubuntu-22.04
76+
77+
# x86_64 musl - static binary, maximum portability
78+
- target: x86_64-unknown-linux-musl
79+
os: ubuntu-latest
80+
81+
# ARM64 glibc - AWS Graviton, modern ARM servers
82+
- target: aarch64-unknown-linux-gnu
83+
os: ubuntu-22.04
84+
85+
# ARM64 musl - static binary for ARM
86+
- target: aarch64-unknown-linux-musl
87+
os: ubuntu-latest
88+
89+
# ----------------------------------------------------------------
90+
# macOS
91+
# ----------------------------------------------------------------
92+
# Intel Macs
93+
- target: x86_64-apple-darwin
94+
os: macos-14
95+
96+
# Apple Silicon (M1/M2/M3)
97+
- target: aarch64-apple-darwin
98+
os: macos-14
99+
100+
# Universal binary (both architectures)
101+
- target: universal-apple-darwin
102+
os: macos-14
103+
104+
# ----------------------------------------------------------------
105+
# Windows
106+
# ----------------------------------------------------------------
107+
# x86_64 Windows
108+
- target: x86_64-pc-windows-msvc
109+
os: windows-2022
110+
111+
# ARM64 Windows (Surface Pro X, etc.)
112+
- target: aarch64-pc-windows-msvc
113+
os: windows-2022
114+
115+
runs-on: ${{ matrix.os }}
116+
timeout-minutes: 60
117+
permissions:
118+
contents: write
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
122+
with:
123+
persist-credentials: false
124+
125+
- name: Install Rust
126+
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # master
127+
with:
128+
toolchain: stable
129+
130+
- name: Setup cross-compilation
131+
uses: taiki-e/setup-cross-toolchain-action@bdeb9ca6f0f909ea36bb94e1e3ec916b2ceb35fc # v1.26.0
132+
with:
133+
target: ${{ matrix.target }}
134+
135+
# Static linking for musl targets (portable binaries)
136+
- name: Configure static linking (musl)
137+
if: contains(matrix.target, '-linux-musl')
138+
run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static -C link-self-contained=yes" >> "$GITHUB_ENV"
139+
shell: bash
140+
141+
# Static linking for Windows (no MSVC runtime dependency)
142+
- name: Configure static linking (Windows)
143+
if: contains(matrix.target, '-windows-msvc')
144+
run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "$GITHUB_ENV"
145+
shell: bash
146+
147+
# macOS deployment targets for compatibility
148+
- name: Set macOS deployment target (Intel)
149+
if: matrix.target == 'x86_64-apple-darwin'
150+
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> "$GITHUB_ENV"
151+
152+
- name: Set macOS deployment target (ARM/Universal)
153+
if: matrix.target == 'aarch64-apple-darwin' || matrix.target == 'universal-apple-darwin'
154+
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV"
155+
156+
- name: Build and upload binary
157+
uses: taiki-e/upload-rust-binary-action@e7953b6078194a4ae5f5619632e3715db6275561 # v1.24.0
158+
with:
159+
bin: cargo-rail
160+
target: ${{ matrix.target }}
161+
# tar for all platforms, zip additionally for Windows
162+
tar: all
163+
zip: windows
164+
token: ${{ secrets.GITHUB_TOKEN }}
165+
166+
# ==========================================================================
167+
# Job 3: Publish to crates.io (after binaries are built)
168+
# ==========================================================================
169+
publish:
170+
name: Publish to crates.io
171+
needs: [create-release, upload-assets]
172+
runs-on: ubuntu-latest
173+
steps:
174+
- name: Checkout
175+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
176+
with:
177+
persist-credentials: false
178+
179+
- name: Install Rust
180+
uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e # master
181+
with:
182+
toolchain: stable
183+
184+
- name: Publish to crates.io
185+
run: cargo publish --token "${{ secrets.CARGO_REGISTRY_TOKEN }}"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cargo-rail"
3-
version = "1.0.0"
3+
version = "0.1.0"
44
edition = "2024"
55
rust-version = "1.91"
66
license = "MIT"

0 commit comments

Comments
 (0)