diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 9b29cd0..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "cargo" - directory: "/" - schedule: - interval: "daily" - time: "09:00" - groups: - grpc: - patterns: - - "tonic" - - "tonic-*" - - "prost" - - "prost-*" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index 1a231e7..0000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,53 +0,0 @@ -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 - 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 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_AUTH_KEY }} - - # 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 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_AUTH_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3070da5..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CI -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ci-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -env: - CARGO_TERM_COLOR: always -jobs: - ci: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - run: rustup default 1.92.0 - - run: rustup component add clippy rustfmt - - uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # ratchet:Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@ae532dedd825648efd18d9c49c9a443d0398ca0a # ratchet:taiki-e/install-action@cargo-make - - name: Install protoc compiler - run: | - sudo apt update -y - sudo apt install -y protobuf-compiler - - run: cargo make ci - - alls-green: - if: always() - runs-on: ubuntu-latest - needs: - - ci - steps: - - run: ${{ !contains(needs.*.result, 'failure') }} diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml deleted file mode 100644 index 628d281..0000000 --- a/.github/workflows/release-binaries.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release Binaries - -permissions: - contents: write - -on: - release: - types: [published] - -jobs: - upload-assets: - name: Upload assets for ${{ matrix.target }} - if: startsWith(github.event.release.tag_name, 'granc-v') - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Linux x86_64 - - target: x86_64-unknown-linux-gnu - os: ubuntu-latest - # macOS x86_64 (Intel) - - target: x86_64-apple-darwin - os: macos-latest - # macOS ARM64 (Apple Silicon) - - target: aarch64-apple-darwin - os: macos-latest - # Windows x86_64 - - target: x86_64-pc-windows-msvc - os: windows-latest - - steps: - - uses: actions/checkout@v6 - - - name: Build and Upload - uses: taiki-e/upload-rust-binary-action@v1 - with: - bin: granc - target: ${{ matrix.target }} - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.woodpecker/cd.yml b/.woodpecker/cd.yml new file mode 100644 index 0000000..ce00f64 --- /dev/null +++ b/.woodpecker/cd.yml @@ -0,0 +1,23 @@ +when: + event: push + branch: main + +depends_on: + - ci + +steps: + - name: Release unpublished + image: codeberg.org/jasterv/rust-magic-release:latest + pull: true + settings: + token: + from_secret: CODEBERG_TOKEN + crates_io_token: + from_secret: CRATES_IO_TOKEN + + - name: Update PR + image: codeberg.org/jasterv/release-plz-update-pr:latest + pull: true + settings: + token: + from_secret: CODEBERG_TOKEN diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml new file mode 100644 index 0000000..888be7b --- /dev/null +++ b/.woodpecker/ci.yml @@ -0,0 +1,11 @@ +when: + - event: [push, pull_request] + branch: main + +steps: + ci: + image: codeberg.org/jasterv/rust-ci:1.93 + commands: + - apt update -y + - apt-get install -y protobuf-compiler + - cargo make ci diff --git a/.woodpecker/release-binary.yml b/.woodpecker/release-binary.yml new file mode 100644 index 0000000..bf6886c --- /dev/null +++ b/.woodpecker/release-binary.yml @@ -0,0 +1,25 @@ +when: + event: tag + ref: refs/tags/granc-v* + +steps: + build: + image: rust:latest + pull: true + commands: + - cargo build --release --target x86_64-unknown-linux-gnu + + package: + image: alpine + commands: + - apk add --no-cache tar gzip + - tar -czf granc-x86_64-unknown-linux-gnu.tgz -C target/x86_64-unknown-linux-gnu/release granc + + publish: + image: woodpeckerci/plugin-release + settings: + base_url: https://codeberg.org + files: + - granc-x86_64-unknown-linux-gnu.tgz + api_key: + from_secret: CODEBERG_TOKEN diff --git a/Cargo.toml b/Cargo.toml index ec9073e..040cca4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ resolver = "2" [workspace.package] authors = ["Victor Martínez Montané "] edition = "2024" -homepage = "https://github.com/JasterV/granc" +homepage = "https://codeberg.org/JasterV/granc" license = "MIT OR Apache-2.0" -repository = "https://github.com/JasterV/granc" +repository = "https://codeberg.org/JasterV/granc" rust-version = "1.89" [workspace.dependencies]