From 85c0f24a34f1f59bc58c6160be4beaa109d3f20e Mon Sep 17 00:00:00 2001 From: nm17 Date: Sat, 15 Mar 2025 22:51:47 +0400 Subject: [PATCH] ci: add some basic ci/cd --- .forgejo/workflows/build-and-upload.yml | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .forgejo/workflows/build-and-upload.yml diff --git a/.forgejo/workflows/build-and-upload.yml b/.forgejo/workflows/build-and-upload.yml new file mode 100644 index 0000000..731f35e --- /dev/null +++ b/.forgejo/workflows/build-and-upload.yml @@ -0,0 +1,26 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + - beta + - nightly + steps: + - uses: actions/checkout@v4 + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo upload + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file