tesla-charge-controller/.gitea/workflows/deb.yaml
Alex Janka a79d91c7ea
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m51s
fixing etc
2024-03-03 09:57:45 +11:00

31 lines
1.1 KiB
YAML

name: Build .deb on release
run-name: Building .deb of latest release and adding to apt repo
on:
push:
tags:
- "*"
jobs:
Build-Deb:
runs-on: aarch64
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Build
run: "cargo build --release --target=aarch64-unknown-linux-gnu"
- name: Build .deb
run: "cargo deb --target=aarch64-unknown-linux-gnu"
- name: Add .deb to apt repository
run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./target/aarch64-unknown-linux-gnu/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-gnu/debian/*.deb
./target/aarch64-unknown-linux-gnu/release/tesla-charge-controller
api_key: "${{secrets.PACKAGING_TOKEN}}"