From 0aeb3390d3412f846894282edc721ca01192c353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABlle=20Huisman?= Date: Mon, 27 Apr 2026 16:19:49 +0200 Subject: [PATCH] ci: use reusable workflows --- .github/workflows/ci.yml | 55 ++---------------------------- .github/workflows/publish.yml | 14 ++++++++ .github/workflows/release.yml | 63 ++--------------------------------- Cargo.lock | 1 - Cargo.toml | 1 - 5 files changed, 20 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 519bb6c..b4b982b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,55 +10,6 @@ permissions: contents: read jobs: - lint: - name: Lint - runs-on: ubuntu-latest - - env: - RUSTFLAGS: '-Dwarnings' - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Set up Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: clippy, rustfmt - - - name: Install Cargo Binary Install - uses: cargo-bins/cargo-binstall@main - - - name: Install crates - run: cargo binstall -y --force cargo-deny cargo-machete cargo-sort - - - name: Lint - run: cargo clippy --all-features --locked - - - name: Check dependencies - run: cargo deny check - - - name: Check unused dependencies - run: cargo machete - - - name: Check manifest formatting - run: cargo sort --workspace --check - - - name: Check formatting - run: cargo fmt --all --check - - test: - name: Test - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Set up Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: clippy, rustfmt - - - name: Test - run: cargo test --all-features --locked --release + rust: + name: Rust + uses: RustForWeb/.github/.github/workflows/rust.yml@c18f3b7315df398b6af8d03f823e31daeda63114 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..823af00 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,14 @@ +name: Publish + +on: + release: + types: [published] + +permissions: + contents: read + id-token: write + +jobs: + publish: + name: Publish + uses: RustForWeb/.github/.github/workflows/publish.yml@c18f3b7315df398b6af8d03f823e31daeda63114 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed4f168..1afcb04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,63 +18,6 @@ permissions: jobs: release: name: Release - runs-on: ubuntu-latest - - steps: - - name: Generate GitHub App token - id: app-token - uses: getsentry/action-github-app-token@v3 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - - - name: Checkout - uses: actions/checkout@v6 - - - name: Set up Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - target: wasm32-unknown-unknown - - - name: Install Cargo Binary Install - uses: cargo-bins/cargo-binstall@main - - - name: Install crates - run: cargo binstall --force -y cargo-workspaces toml-cli - - - name: Bump version - run: cargo workspaces version --all --no-git-commit --yes ${{ inputs.bump }} - - - name: Extract version - id: extract-version - run: echo "VERSION=v$(toml get Cargo.toml package.version --raw)" >> "$GITHUB_OUTPUT" - - - name: Add changes - run: git add . - - - name: Commit - uses: dsanders11/github-app-commit-action@v2 - with: - message: ${{ steps.extract-version.outputs.VERSION }} - token: ${{ steps.app-token.outputs.token }} - - - name: Reset and pull - run: git reset --hard && git pull - - - name: Tag - uses: bruno-fs/repo-tagger@1.0.0 - with: - tag: ${{ steps.extract-version.outputs.VERSION }} - env: - GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} - - - name: Release - uses: softprops/action-gh-release@v3 - with: - generate_release_notes: true - make_latest: true - tag_name: ${{ steps.extract-version.outputs.VERSION }} - token: ${{ steps.app-token.outputs.token }} - - - name: Publish - run: cargo workspaces publish --publish-as-is --token "${{ secrets.CRATES_IO_TOKEN }}" + uses: RustForWeb/.github/.github/workflows/release.yml@c18f3b7315df398b6af8d03f823e31daeda63114 + with: + bump: ${{ inputs.bump }} diff --git a/Cargo.lock b/Cargo.lock index f9c0d7c..04ed3b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2823,7 +2823,6 @@ dependencies = [ "mockito", "querystring", "reqwest", - "rsa", "serde", "serde_json", "thiserror 2.0.18", diff --git a/Cargo.toml b/Cargo.toml index f41fdfc..2e99dcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,6 @@ urlencoding = "2.1.3" [dev-dependencies] matches = "0.1.10" mockito = "1.0.0" -rsa = "0.9.10" tokio = { version = "1.44.2", default-features = false, features = [ "macros", "rt-multi-thread",