Files
gt-tool/.gitea/workflows/release.yml

63 lines
2.1 KiB
YAML

---
on:
push:
branches: [deb-auto/exp]
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-tool target/release/gt-tool-${{ github.ref_name }}-$(arch)
- name: Upload the program (using itself!)
run: >
target/release/gt-tool-${{ github.ref_name }}-$(arch)
-u ${{ vars.DEST_GITEA }} -r ${{ vars.DEST_REPO }}
upload-release
"${{ github.ref_name }}"
target/release/gt-tool-${{ github.ref_name }}-$(arch)
env:
RELEASE_KEY_GITEA: ${{ secrets.RELEASE_KEY_GITEA }}
debian-release:
name: Build and upload the Debian 12 package
runs-on: ubuntu-latest
container:
image: debian:12
steps:
- name: Install Tools
run: >
apt-get update;
apt-get install -y --no-install-recommends
build-essential
git
git-buildpackage;
- name: Checkout Repo (can't use actions/checkout@v4, no NodeJS)
run: git clone ${{ github.event.repository.clone_url }}
- name: Switch to Debian package branch
run: git checkout deb
working-directory: ./gt-tool
- name: Install build-deps
run: apt-get build-dep .
working-directory: ./gt-tool
- name: Build the package
run: gbp buildpackage
- name: Install the tool we just built
run: dpkg -i gt-tool*.deb # TODO: Pick out the exact version instead of globbing
- name: Upload the packaging parts
run: > # The file globs are like that to avoid matching the gt-tool/ folder. I don't want that uploaded.
gt-tool
-u ${{ vars.DEST_GITEA }} -r ${{ vars.DEST_REPO }}
upload-release
"${{ github.ref_name }}"
gt-tool-*
gt-tool_*
...