Basic automated build-and-upload

This commit is contained in:
2025-06-05 21:04:30 -05:00
parent aadaff5db4
commit b76d5f836d

View 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 }}
...