mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-12-06 00:23:16 +01:00
👷: add gitea ci
This commit is contained in:
20
.gitea/workflows/check.yml
Normal file
20
.gitea/workflows/check.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
name: rust-check
|
||||||
|
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
- push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rust-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: "clippy,rustfmt"
|
||||||
|
- run: cargo fmt -- --check
|
||||||
|
- run: cargo check
|
||||||
|
- run: cargo clippy -- -D warnings
|
||||||
|
- run: cargo test
|
||||||
|
- run: cargo build
|
||||||
23
.gitea/workflows/release.yml
Normal file
23
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
name: rust-release
|
||||||
|
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Get package name
|
||||||
|
run: echo "CARGO_PKG_NAME=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].name')" >> $GITEA_ENV
|
||||||
|
- run: cargo build --release
|
||||||
|
- uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
files: |-
|
||||||
|
target/release/${{ env.CARGO_PKG_NAME }}
|
||||||
|
api_key: '${{ secrets.RELEASE_TOKEN }}'
|
||||||
Reference in New Issue
Block a user