From 4b5484a23fe7538300f97a4aca2431c6083b31cc Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Sat, 27 Dec 2025 20:24:55 +1300 Subject: [PATCH 1/4] feat(ci): upload build artifacts to github release --- .github/workflows/build.yml | 111 +++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec8dc2172..efeb57764 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,17 @@ name: CD Pipeline -on: [push] +on: + push: + branches: + - "master" + tags: + - "*" jobs: build-nix: env: IN_PIPELINE: true runs-on: ${{ matrix.os }} - if: github.ref == 'refs/heads/master' strategy: matrix: type: [ubuntu-x64, ubuntu-x86, armv7, aarch64] @@ -48,19 +52,15 @@ jobs: args: "--locked --release" strip: true toolchain: stable - - name: Build tar.gz for homebrew installs - if: matrix.type == 'ubuntu-x64' - run: | - tar czf ${{ matrix.name }}.tar.gz -C target/x86_64-unknown-linux-musl/release rustscan - - uses: actions/upload-artifact@v4 + - name: Upload artifacts + uses: houseabsolute/actions-rust-release@v0 with: - name: ${{ matrix.name }} - path: ${{ matrix.path }} - - uses: actions/upload-artifact@v4 - if: matrix.type == 'ubuntu-x64' - with: - name: ${{ matrix.name }}.tar.gz - path: ${{ matrix.name }}.tar.gz + executable-name: rustscan + target: ${{ matrix.target }} + archive-name: ${{ matrix.name }} + changes-file: "" + release-tag-prefix: "disabled" + build-deb: needs: [build-nix] runs-on: ubuntu-latest @@ -88,7 +88,6 @@ jobs: env: IN_PIPELINE: true runs-on: macos-latest - if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v4 - name: Cache cargo & target directories @@ -101,23 +100,19 @@ jobs: args: "--locked --release" strip: true toolchain: stable - - name: Build tar.gz for homebrew installs - run: | - tar czf x86_64-macos-rustscan.tar.gz -C target/x86_64-apple-darwin/release rustscan - - uses: actions/upload-artifact@v4 - with: - name: x86_64-macos-rustscan - path: target/x86_64-apple-darwin/release/rustscan - - uses: actions/upload-artifact@v4 + - name: Upload artifacts + uses: houseabsolute/actions-rust-release@v0 with: - name: x86_64-macos-rustscan.tar.gz - path: x86_64-macos-rustscan.tar.gz - + executable-name: rustscan + target: x86_64-apple-darwin + archive-name: x86_64-macos-rustscan + changes-file: "" + release-tag-prefix: "disabled" + build-macos-aarch64: env: IN_PIPELINE: true runs-on: macos-latest - if: github.ref == 'refs/heads/master' steps: - uses: actions/checkout@v4 - name: Cache cargo & target directories @@ -130,23 +125,19 @@ jobs: args: "--locked --release" strip: true toolchain: stable - - name: Build tar.gz for homebrew installs - run: | - tar czf aarch64-macos-rustscan.tar.gz -C target/aarch64-apple-darwin/release rustscan - - uses: actions/upload-artifact@v4 + - name: Upload artifacts + uses: houseabsolute/actions-rust-release@v0 with: - name: aarch64-macos-rustscan - path: target/aarch64-apple-darwin/release/rustscan - - uses: actions/upload-artifact@v4 - with: - name: aarch64-macos-rustscan.tar.gz - path: aarch64-macos-rustscan.tar.gz + executable-name: rustscan + target: aarch64-apple-darwin + archive-name: aarch64-macos-rustscan + changes-file: "" + release-tag-prefix: "disabled" build-windows: env: IN_PIPELINE: true runs-on: ${{ matrix.os }} - if: github.ref == 'refs/heads/master' strategy: matrix: type: [windows-x64, windows-x86] @@ -154,13 +145,11 @@ jobs: - type: windows-x64 os: windows-latest target: x86_64-pc-windows-msvc - name: x86_64-windows-rustscan.exe - path: target\x86_64-pc-windows-msvc\release\rustscan.exe + name: x86_64-windows-rustscan - type: windows-x86 os: windows-latest target: i686-pc-windows-msvc - name: x86-windows-rustscan.exe - path: target\i686-pc-windows-msvc\release\rustscan.exe + name: x86-windows-rustscan steps: - uses: actions/checkout@v4 - name: Cache cargo & target directories @@ -169,11 +158,41 @@ jobs: uses: houseabsolute/actions-rust-cross@v0 with: command: build - target: ${{ matrix.target }} + target: ${{ matrix.target }} args: "--locked --release" strip: true toolchain: stable - - uses: actions/upload-artifact@v4 + - name: Upload artifacts + uses: houseabsolute/actions-rust-release@v0 + with: + executable-name: rustscan + target: ${{ matrix.target }} + archive-name: ${{ matrix.name }} + changes-file: "" + release-tag-prefix: "disabled" + + publish: + if: github.ref_type == 'tag' + needs: + - build-nix + - build-deb + - build-macos + - build-macos-aarch64 + - build-windows + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Download build artifacts + uses: actions/download-artifact@v8 + with: + merge-multiple: true + - name: Publish artifacts to GitHub release + if: github.ref_type == 'tag' + uses: softprops/action-gh-release@v2 with: - name: ${{ matrix.name }} - path: ${{ matrix.path }} + files: | + *.deb + *.sha256 + *.tar.gz + *.zip From f60238afd2fa81b424105c458cd4571357c8bbd5 Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Mon, 29 Dec 2025 22:32:20 +1300 Subject: [PATCH 2/4] feat(ci): remove deprecated github action --- .github/workflows/test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 527f907c9..d86453ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,11 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true + run: rustup toolchain install "${{ matrix.rust }}" --profile minimal - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 From 16f76c17f9e009b1741c8622cafa5ae92f1d503a Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Mon, 29 Dec 2025 22:53:07 +1300 Subject: [PATCH 3/4] feat(ci): fix dependabot auto-merge workflow --- .github/workflows/dependabot.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 7f9508bde..a21a8dc24 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -1,9 +1,14 @@ name: Dependabot Auto-Merge +on: pull_request + +permissions: + contents: write + pull-requests: write jobs: dependabot: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'bee-san/RustScan' steps: - name: Enable auto-merge for Dependabot PRs run: | From 933a2a929aeb8981e1091c09077a3818fc3bc961 Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Tue, 30 Dec 2025 11:23:18 +1300 Subject: [PATCH 4/4] build(deps): bump github actions to latest version --- .github/workflows/build.yml | 20 ++++++++++---------- .github/workflows/test.yml | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efeb57764..443f4bff0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,11 +41,11 @@ jobs: path: target/aarch64-unknown-linux-gnu/release/rustscan pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo & target directories uses: Swatinem/rust-cache@v2 - name: Build binary - uses: houseabsolute/actions-rust-cross@v0 + uses: houseabsolute/actions-rust-cross@v1 with: command: build target: ${{ matrix.target }} @@ -67,7 +67,7 @@ jobs: env: IN_PIPELINE: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install cargo-deb run: cargo install -f cargo-deb - uses: awalsh128/cache-apt-pkgs-action@v1 @@ -79,7 +79,7 @@ jobs: - name: Deb Build run: cargo deb --target=x86_64-unknown-linux-musl - name: Upload Deb Artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: rustscan.deb path: ./target/x86_64-unknown-linux-musl/debian/* @@ -89,11 +89,11 @@ jobs: IN_PIPELINE: true runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo & target directories uses: Swatinem/rust-cache@v2 - name: Build binary - uses: houseabsolute/actions-rust-cross@v0 + uses: houseabsolute/actions-rust-cross@v1 with: command: build target: x86_64-apple-darwin @@ -114,11 +114,11 @@ jobs: IN_PIPELINE: true runs-on: macos-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo & target directories uses: Swatinem/rust-cache@v2 - name: Build binary - uses: houseabsolute/actions-rust-cross@v0 + uses: houseabsolute/actions-rust-cross@v1 with: command: build target: aarch64-apple-darwin @@ -151,11 +151,11 @@ jobs: target: i686-pc-windows-msvc name: x86-windows-rustscan steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Cache cargo & target directories uses: Swatinem/rust-cache@v2 - name: Build binary - uses: houseabsolute/actions-rust-cross@v0 + uses: houseabsolute/actions-rust-cross@v1 with: command: build target: ${{ matrix.target }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d86453ca9..228b91fb3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install stable toolchain run: rustup toolchain install "${{ matrix.rust }}" --profile minimal @@ -24,7 +24,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Install Just - uses: extractions/setup-just@v2 + uses: extractions/setup-just@v3 - name: Run just run: just test