From 524d166ce0762bd11b27ad754a91d3f07d88b304 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Fri, 3 Apr 2026 04:30:13 +0200 Subject: [PATCH] chore: Setup workflows --- .gitea/workflows/audit.yaml | 21 +++++++++++++++++++++ .gitea/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ .gitea/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ .release-plz.toml | 3 +++ 4 files changed, 85 insertions(+) create mode 100644 .gitea/workflows/audit.yaml create mode 100644 .gitea/workflows/ci.yaml create mode 100644 .gitea/workflows/release.yaml create mode 100644 .release-plz.toml diff --git a/.gitea/workflows/audit.yaml b/.gitea/workflows/audit.yaml new file mode 100644 index 0000000..1f6408f --- /dev/null +++ b/.gitea/workflows/audit.yaml @@ -0,0 +1,21 @@ +name: Audit + +on: + push: + paths: + - "**/Cargo.toml" + - "**/Cargo.lock" + schedule: + - cron: "0 0 * * *" + +jobs: + audit: + name: cargo audit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - uses: rustsec/audit-check@v2.0.0 + with: + token: ${{ secrets.GITEA_TOKEN }} diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..c10a4a2 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,32 @@ +name: CI +on: + push: + branches: + - "main" + tags: + - "*" + pull_request: + +jobs: + prek: + name: prek + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - uses: j178/prek-action@v2 + + cargo-shear: + name: cargo shear + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@v2 + with: + tool: cargo-shear + - run: cargo shear --deny-warnings diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..876f6b2 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,29 @@ +name: Release-plz + +on: + push: + branches: + - main + +jobs: + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + - uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@v2 + with: + tool: release-plz + - name: Setup git config + uses: https://github.com/OleksiyRudenko/gha-git-credentials@v2-latest + with: + token: "${{ secrets.GITEA_TOKEN }}" + actor: automation + name: Automation + email: "automation@huizinga.dev" + - run: release-plz release-pr --git-token "${{ secrets.RELEASE_PLZ_TOKEN }}" --forge gitea -o json diff --git a/.release-plz.toml b/.release-plz.toml new file mode 100644 index 0000000..c2874c0 --- /dev/null +++ b/.release-plz.toml @@ -0,0 +1,3 @@ +[[package]] +name = "xtask" +release = false