tesla-charge-controller/.forgejo/workflows/deb.yaml

36 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-07-09 09:44:03 +10:00
name: Build and release .deb
2024-01-20 20:33:25 +11:00
2024-03-03 09:53:29 +11:00
on:
2024-01-20 20:33:25 +11:00
push:
tags:
2024-12-28 18:54:21 +11:00
- "v*"
2024-01-20 20:33:25 +11:00
jobs:
2024-07-09 09:44:03 +10:00
Release:
2024-03-03 09:53:29 +11:00
runs-on: aarch64
2024-01-20 20:33:25 +11:00
steps:
2024-12-26 22:59:02 +11:00
- 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"
2024-01-20 20:33:25 +11:00
- name: Add .deb to apt repository
2024-12-26 22:59:02 +11:00
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"
2024-03-03 09:53:29 +11:00
- name: "Release package"
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
2024-12-26 22:31:58 +11:00
./target/aarch64-unknown-linux-musl/debian/*.deb
2024-12-28 18:54:21 +11:00
./target/aarch64-unknown-linux-musl/release/charge-controller-supervisor
2024-03-03 09:53:29 +11:00
api_key: "${{secrets.PACKAGING_TOKEN}}"