tesla-charge-controller/.gitea/workflows/deb.yaml
Alex Janka 2c7aa8641c
All checks were successful
Build and release .deb / Release (push) Successful in 52s
split: initial (and bad)
2024-12-28 19:04:43 +11:00

35 lines
1.2 KiB
YAML

name: Build and release .deb
on:
push:
tags:
- "v*"
jobs:
Release:
runs-on: aarch64
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Select rustup channel
run: "rustup default stable"
- name: Update toolchain
run: "rustup target add aarch64-unknown-linux-musl"
- name: Install cargo-deb
run: "cargo install --locked cargo-deb"
- name: Build
run: "cargo build --release --target=aarch64-unknown-linux-musl"
- name: Build .deb
run: "cargo deb --target=aarch64-unknown-linux-musl"
- name: Add .deb to apt repository
run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./target/aarch64-unknown-linux-musl/debian/*.deb | head -1) https://git.alexjanka.com/api/packages/alex/debian/pool/testing/main/upload"
- name: "Release package"
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
./target/aarch64-unknown-linux-musl/debian/*.deb
./target/aarch64-unknown-linux-musl/release/charge-controller-supervisor
api_key: "${{secrets.PACKAGING_TOKEN}}"