parent
88ba179ad1
commit
2fe3182706
3 changed files with 15 additions and 49 deletions
.gitea/workflows
|
@ -1,33 +0,0 @@
|
||||||
name: Build .deb
|
|
||||||
|
|
||||||
on: workflow_call
|
|
||||||
|
|
||||||
env:
|
|
||||||
SCCACHE_GHA_ENABLED: "true"
|
|
||||||
RUSTC_WRAPPER: "sccache"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Build-Deb:
|
|
||||||
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: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: release
|
|
||||||
path: |
|
|
||||||
./target/aarch64-unknown-linux-musl/debian/*.deb
|
|
||||||
./target/aarch64-unknown-linux-musl/release/tesla-charge-controller
|
|
|
@ -6,16 +6,25 @@ on:
|
||||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
|
||||||
uses: ./.gitea/workflows/build.yaml
|
|
||||||
|
|
||||||
Release:
|
Release:
|
||||||
runs-on: aarch64
|
runs-on: aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Check out repository code
|
||||||
uses: actions/download-artifact@v4
|
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
|
- name: Add .deb to apt repository
|
||||||
run: "curl --user alex:${{ secrets.PACKAGING_TOKEN }} --upload-file $(ls -t ./release/*.deb | head -1) https://git.alexjanka.com/api/packages/alex/debian/pool/testing/main/upload"
|
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"
|
- name: "Release package"
|
||||||
id: use-go-action
|
id: use-go-action
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
name: Build prerelease .deb
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*-pre"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
Build:
|
|
||||||
uses: ./.gitea/workflows/build.yaml
|
|
Loading…
Add table
Reference in a new issue