From 3a1556c277d7b0a9d6f0e69fe2bec4a611636af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20=C3=9Cst=C3=BCn?= Date: Tue, 23 Jun 2026 13:50:58 +0300 Subject: [PATCH] ci: modernize release workflow for current runners and actions Replace retired macos-12 runners with native macos-13 (x86_64) and macos-14 (aarch64); bump actions/checkout v3 -> v5, actions/upload-artifact v3 -> v4, and softprops/action-gh-release v1 -> v2. Give each matrix job a unique artifact name (upload-artifact v4 requires it), install the build target via setup-rust-toolchain instead of a separate rustup step, and install libxdo-dev in the publish-crate job so the crates.io verification build can link enigo. --- .github/workflows/release.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 787653e..94e9dab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,26 +16,24 @@ jobs: target: x86_64-pc-windows-msvc - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu - - os: macos-12 + - os: macos-13 target: x86_64-apple-darwin - - os: macos-12 + - os: macos-14 target: aarch64-apple-darwin runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install target - run: rustup target add ${{ matrix.target }} - if: contains(fromJSON('["x86_64-unknown-linux-gnu", "aarch64-apple-darwin"]'), matrix.target) + with: + target: ${{ matrix.target }} - name: Install libxdo-dev if: matrix.target == 'x86_64-unknown-linux-gnu' - run: sudo apt-get update && sudo apt-get install libxdo-dev + run: sudo apt-get update && sudo apt-get install -y libxdo-dev - name: Build run: cargo build --verbose --locked -F bin --release --target ${{ matrix.target }} @@ -51,13 +49,13 @@ jobs: tar zcf $staging.tar.gz $staging echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: release + name: release-${{ matrix.target }} path: ${{ env.ASSET }} - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: draft: true @@ -68,13 +66,16 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') # Only runs this job if the push is a tag steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v5 - name: Setup Rust uses: actions-rust-lang/setup-rust-toolchain@v1 with: profile: minimal # Only install what's necessary + - name: Install libxdo-dev + run: sudo apt-get update && sudo apt-get install -y libxdo-dev + - name: Publish to crates.io env: CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} # Use the secret token