Basic automated build-and-upload
This commit is contained in:
27
.gitea/workflows/release.yml
Normal file
27
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
make-release:
|
||||
runs-on: ubuntu-latest
|
||||
name: Compile and upload a release build
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust Stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Build binary crate
|
||||
run: cargo build --release
|
||||
- name: Rename binary to include architecture
|
||||
run: mv target/release/gt-tools target/release/gt-tools-${{ github.ref_name }}-$(arch)
|
||||
- name: Upload the program (using itself!)
|
||||
run: >
|
||||
target/release/gt-tools-${{ github.ref_name }}-$(arch)
|
||||
-u ${{ vars.DEST_GITEA }} -r ${{ vars.DEST_REPO }}
|
||||
upload-release
|
||||
"${{ github.ref_name }}"
|
||||
target/release/gt-tools-${{ github.ref_name }}-$(arch)
|
||||
env:
|
||||
RELEASE_KEY_GITEA: ${{ secrets.RELEASE_KEY_GITEA }}
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user