ci: migrate project automation to Just (#442)
Deploy docs to GitHub Pages / deploy (push) Has been cancelled
Site / build-site (push) Has been cancelled
Install.sh / build (macos-latest) (push) Has been cancelled
Install.sh / build (ubuntu-latest) (push) Has been cancelled
CI / toolchain (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / install-scripts (push) Has been cancelled
CI / crates-ubuntu-latest (push) Has been cancelled
CI / crates-windows-latest (push) Has been cancelled
CI / doc (push) Has been cancelled
CI / deny (push) Has been cancelled
CI / crates-macos-latest (push) Has been cancelled

* ci: migrate project automation to Just

Centralize build, test, release, dependency, hook, and website commands in Just recipes. Pin workflow tooling, use the repository toolchain, and run the complete validation set in CI.

* ci: codex being codex

* docs: update CLAUDE.md for just task runner migration

Reflect the switch to just recipes for build/test/clippy/fmt, note
dprint replacing raw rustfmt, and add a cross-platform code requirement.

* fix: resolve clippy warnings breaking CI on ubuntu and windows

Use clone() instead of implicit to_string() on already-owned String
values, gate the windows-only unused make_file_at import behind
cfg(posix), and fix unused mut / manual assign-op in the windows-only
localhost test.

* fix: fmt
This commit is contained in:
Christian Visintin
2026-08-28 19:29:58 +02:00
committed by GitHub
parent 08c51a32cc
commit afbc74113f
54 changed files with 889 additions and 404 deletions
+41 -23
View File
@@ -22,23 +22,35 @@ jobs:
outputs:
version: ${{ inputs.version }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.RELEASE_PAT }}
persist-credentials: true
fetch-depth: 0
fetch-tags: true
- name: Validate version
env:
VERSION: ${{ inputs.version }}
run: |
if [[ ! "$VERSION" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then
echo "invalid release version: $VERSION (expected MAJOR.MINOR.PATCH)" >&2
exit 2
fi
- name: Configure git identity
run: |
git config user.name "veeso"
git config user.email "christian.visintin@veeso.dev"
- name: Install git-cliff
uses: taiki-e/install-action@56545b37b57562edd73171cb6c62cc509db4c34e # v2
uses: taiki-e/install-action@37f7c5781271959fb65b6b35224e28652ff2b63d # v2.87.0
with:
tool: git-cliff
- name: Install just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
- name: Bump version
env:
VERSION: ${{ inputs.version }}
@@ -47,7 +59,7 @@ jobs:
- name: Generate CHANGELOG
env:
VERSION: ${{ inputs.version }}
run: git-cliff --tag "v$VERSION" -o CHANGELOG.md
run: just changelog "$VERSION"
- name: Generate release notes
env:
@@ -55,7 +67,7 @@ jobs:
run: git-cliff --unreleased --tag "v$VERSION" --strip header -o RELEASE_NOTES.md
- name: Upload release notes
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: release-notes
path: RELEASE_NOTES.md
@@ -111,15 +123,20 @@ jobs:
TARGET: ${{ matrix.target }}
FEATURES: ${{ matrix.features }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.dry_run && github.sha || 'main' }}
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
targets: ${{ matrix.target }}
- name: Install just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
- name: Install Rust target
if: matrix.kind != 'windows'
run: rustup target add "$TARGET"
- name: Install Rust target
if: matrix.kind == 'windows'
run: rustup target add "$env:TARGET"
# ---- Linux: native per-arch build (x86_64 on ubuntu-latest, aarch64 on ubuntu-24.04-arm) ----
- name: Install dependencies (Linux)
@@ -156,10 +173,10 @@ jobs:
cargo install cargo-deb
- name: Build (Linux)
if: matrix.kind == 'linux'
run: cargo build --release --features smb-vendored --target "$TARGET"
run: just build_release "$TARGET" "--features smb-vendored"
- name: Build deb (Linux)
if: matrix.kind == 'linux'
run: cargo deb --no-build --target "$TARGET" --features smb-vendored
run: just package_deb "$TARGET"
# ---- macOS ----
- name: Install deps (macOS)
@@ -173,12 +190,12 @@ jobs:
cpanm Parse::Yapp::Driver
- name: Build (macOS)
if: matrix.kind == 'macos'
run: cargo build --release $FEATURES --target "$TARGET"
run: just build_release "$TARGET" "$FEATURES"
# ---- Windows ----
- name: Build (Windows)
if: matrix.kind == 'windows'
run: cargo build --release --features smb-vendored --target "$env:TARGET"
run: just build_release "$env:TARGET" "--features smb-vendored"
# ---- Package posix (tar.gz) ----
- name: Package (posix)
@@ -204,7 +221,7 @@ jobs:
run: cp target/"$TARGET"/debian/*.deb artifact/
- name: Upload build artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: build-${{ matrix.target }}
path: artifact/*
@@ -218,14 +235,14 @@ jobs:
VERSION: ${{ needs.prepare.outputs.version }}
steps:
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: build-*
path: dl
merge-multiple: true
- name: Checkout homebrew tap
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: veeso/homebrew-termscp
token: ${{ secrets.RELEASE_PAT }}
@@ -316,21 +333,21 @@ jobs:
env:
VERSION: ${{ needs.prepare.outputs.version }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.RELEASE_PAT }}
ref: ${{ inputs.dry_run && github.sha || 'main' }}
persist-credentials: true
- name: Download build artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: build-*
path: dl
merge-multiple: true
- name: Download release notes
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: release-notes
path: notes
@@ -355,7 +372,7 @@ jobs:
- name: Upload assets artifact (dry run)
if: ${{ inputs.dry_run }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: release-assets-dryrun
path: out/*
@@ -380,13 +397,14 @@ jobs:
env:
VERSION: ${{ needs.prepare.outputs.version }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Install just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
- name: Install dependencies (Linux)
run: |
@@ -421,12 +439,12 @@ jobs:
- name: Authenticate to crates.io
id: auth
uses: rust-lang/crates-io-auth-action@bbd81622f20ce9e2dd9622e3218b975523e45bbe # v1.0.4
uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
run: cargo publish --features smb-vendored
run: just publish_crate
publish-choco:
needs: [prepare, release]