2024-01-20 20:33:25 +11:00
|
|
|
name: Build .deb on release
|
|
|
|
run-name: Building .deb of latest release and adding to apt repo
|
|
|
|
|
2024-03-03 09:53:29 +11:00
|
|
|
on:
|
2024-01-20 20:33:25 +11:00
|
|
|
push:
|
|
|
|
tags:
|
2024-03-03 09:53:29 +11:00
|
|
|
- "*"
|
2024-01-20 20:33:25 +11:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build-Deb:
|
2024-03-03 09:53:29 +11:00
|
|
|
runs-on: aarch64
|
2024-01-20 20:33:25 +11:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2024-01-21 07:36:01 +11:00
|
|
|
with:
|
2024-03-03 09:53:29 +11:00
|
|
|
submodules: "recursive"
|
|
|
|
- name: Build
|
|
|
|
run: "cargo build --release --target=aarch64-unknown-linux-gnu"
|
2024-01-20 20:33:25 +11:00
|
|
|
- name: Build .deb
|
2024-01-20 20:35:35 +11:00
|
|
|
run: "cargo deb --target=aarch64-unknown-linux-gnu"
|
2024-01-20 20:33:25 +11:00
|
|
|
- name: Add .deb to apt repository
|
2024-03-03 09:53:29 +11:00
|
|
|
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}}"
|