From 48b20bf311bd920ffce22a89f8b15adc8816f8ba Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Sun, 10 Nov 2024 01:05:24 +0800 Subject: [PATCH] add workflow --- .gitea/workflows/default.yaml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/default.yaml diff --git a/.gitea/workflows/default.yaml b/.gitea/workflows/default.yaml new file mode 100644 index 0000000..d5b6803 --- /dev/null +++ b/.gitea/workflows/default.yaml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build + run: cargo build --release + + - name: Rename binary + run: mv target/release/audio-typing target/release/voice-typing + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: voice-typing + path: target/release/voice-typing \ No newline at end of file