diff --git a/.gitea/workflows/audit.yaml b/.gitea/workflows/audit.yaml new file mode 100644 index 0000000..c618d20 --- /dev/null +++ b/.gitea/workflows/audit.yaml @@ -0,0 +1,20 @@ +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: 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..aa38609 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,28 @@ +name: CI +on: + push: + branches: + - "*" + 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: j178/prek-action@v2 + + cargo-shear: + name: cargo shear + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: dtolnay/rust-toolchain@nightly + - 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..c67d0d3 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,55 @@ +name: Release-plz + +on: + push: + branches: + - main + +jobs: + # Release unpublished packages. + release-plz-release: + name: Release-plz release + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: read + steps: + - &checkout + name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + persist-credentials: false + - &install-rust + name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release + forge: gitea + env: + GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} + + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + forge: gitea + env: + GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}