diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..f11a534 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,56 @@ +name: Rust-build + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + + - name: Check-out + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Run cargo check + uses: https://github.com/actions-rs/cargo@v1 + with: + command: check + + - name: Install nightly toolchain with clippy available + uses: https://github.com/actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: clippy + + - name: Run cargo clippy + uses: https://github.com/actions-rs/cargo@v1 + continue-on-error: true # WARNING: only for this example, remove it! + with: + command: clippy + args: -- -D warnings + + - name: Test + run: cargo test + + - name: Build + run: cargo build --release + + - name: Create release + uses: https://gitea.com/actions/release-action@main + with: + files: |- + target/release/portnut + api_key: '${{secrets.RELEASE_TOKEN}}'