debian packaging
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m39s
All checks were successful
Build .deb on release / Build-Deb (push) Successful in 1m39s
This commit is contained in:
parent
d4a7107978
commit
19a98fbf31
28
.gitea/workflows/deb.yaml
Normal file
28
.gitea/workflows/deb.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
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
|
||||||
|
- 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-auth-callback-watcher
|
||||||
|
api_key: "${{secrets.PACKAGING_TOKEN}}"
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -2307,7 +2307,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tesla-auth-callback-watcher"
|
name = "tesla-auth-callback-watcher"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alex-utils",
|
"alex-utils",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -1,9 +1,16 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tesla-auth-callback-watcher"
|
name = "tesla-auth-callback-watcher"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
license = "Apache-2.0"
|
||||||
|
description = "Auth callback watcher for tesla-charge-controller"
|
||||||
|
authors = ["Alex Janka"]
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
[package.metadata.deb]
|
||||||
|
maintainer-scripts = "packaging/service/"
|
||||||
|
systemd-units = { enable = false }
|
||||||
|
depends = ""
|
||||||
|
assets = [["target/release/tesla-auth-callback-watcher", "usr/bin/", "755"]]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rocket = "0.5.0"
|
rocket = "0.5.0"
|
||||||
|
|
|
@ -22,5 +22,5 @@ package() {
|
||||||
cd "auth-callback-watcher"
|
cd "auth-callback-watcher"
|
||||||
|
|
||||||
install -Dm755 "target/release/tesla-auth-callback-watcher" "$pkgdir/usr/bin/tesla-auth-callback-watcher"
|
install -Dm755 "target/release/tesla-auth-callback-watcher" "$pkgdir/usr/bin/tesla-auth-callback-watcher"
|
||||||
install -D -m 0644 package/tesla-auth-callback-watcher.service "${pkgdir}/usr/lib/systemd/system/tesla-auth-callback-watcher.service"
|
install -D -m 0644 packaging/service/service "${pkgdir}/usr/lib/systemd/system/tesla-auth-callback-watcher.service"
|
||||||
}
|
}
|
Loading…
Reference in a new issue