From 994339399f28b6d1bf8a22b823149b2231b74034 Mon Sep 17 00:00:00 2001 From: zxq5 Date: Mon, 28 Sep 2026 23:26:49 +0100 Subject: [PATCH] actions --- .../zxq5_egui/.gitea/actions/publish.yml | 44 +++++++++++++++++++ resources/compiler_test.dsc | 0 2 files changed, 44 insertions(+) create mode 100644 libraries/zxq5_egui/.gitea/actions/publish.yml create mode 100644 resources/compiler_test.dsc diff --git a/libraries/zxq5_egui/.gitea/actions/publish.yml b/libraries/zxq5_egui/.gitea/actions/publish.yml new file mode 100644 index 0000000..30976b8 --- /dev/null +++ b/libraries/zxq5_egui/.gitea/actions/publish.yml @@ -0,0 +1,44 @@ +name: Publish crate + +# Save as .gitea/workflows/publish.yml +# Publishes when you push a tag like v0.1.0 (the tag should match Cargo.toml's version). +on: + push: + tags: + - "v*" + +env: + CARGO_TERM_COLOR: always + # Registry is named "gitea" and points at the owner of the current repo. + # github.server_url / github.repository_owner are populated by Gitea Actions. + CARGO_REGISTRIES_GITEA_INDEX: "sparse+${{ github.server_url }}/api/packages/${{ github.repository_owner }}/cargo/" + CARGO_REGISTRIES_GITEA_TOKEN: "Bearer ${{ secrets.CARGO_REGISTRY_TOKEN }}" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + + - name: Build + run: cargo build --release --locked + + - name: Test + run: cargo test --locked + + - name: Publish to Gitea registry + run: cargo publish --registry gitea --locked diff --git a/resources/compiler_test.dsc b/resources/compiler_test.dsc new file mode 100644 index 0000000..e69de29