-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build a binary deb package instead of a source package - life is way …
…too short for all this hassle!
- Loading branch information
Showing
9 changed files
with
129 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
Source: hamdeck | ||
Section: ham | ||
Priority: extra | ||
Package: hamdeck | ||
Architecture: amd64 | ||
Section: universe/hamradio | ||
Priority: optional | ||
Version: !THE_VERSION! | ||
Maintainer: Florian Thienel <[email protected]> | ||
Homepage: http://github.com/ftl/hamdeck | ||
Build-Depends: | ||
debhelper (>= 12), | ||
golang-go (>= 2:1.16), | ||
libhidapi-libusb0 (>= 0.9) | ||
|
||
Package: hamdeck | ||
Architecture: amd64 i386 armhf | ||
Recommends: pulseaudio | ||
Bugs: http://github.com/ftl/hamdeck/issues | ||
Description: HamDeck allows you to control and automate your ham radio station | ||
using an Elgato Stream Deck device. You can define buttons using a JSON | ||
configuration file. HamDeck connects to the local pulseaudio server, to a | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Continuous Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- "**" | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
|
||
build: | ||
name: Continuous Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install Linux packages | ||
run: sudo apt update && sudo apt install -y --no-install-recommends debhelper libhidapi-libusb0 | ||
|
||
- name: Set up Go 1.16 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Caching build artifacts and modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build and Test | ||
run: env VERSION=ci@$GITHUB_REF make | ||
|
||
- name: 'Upload binary for linux_x86_64' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: hamdeck-binary | ||
path: ./hamdeck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
branches: | ||
- releng | ||
|
||
jobs: | ||
|
||
build: | ||
name: Release Build | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- id: version_number | ||
run: echo "::set-output name=version_number::$(echo '${{github.ref}}' | sed -E 's#refs/tags/v##')" | ||
|
||
- name: Install Linux packages | ||
run: sudo apt update && sudo apt install -y --no-install-recommends debhelper libhidapi-libusb0 | ||
|
||
- name: Set up Go 1.16 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Caching build artifacts and modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build and Test | ||
run: | | ||
echo "Version ${{ steps.version_number.outputs.version_number }}" | ||
env VERSION="${{ steps.version_number.outputs.version_number }}" make | ||
- name: Create package structure | ||
run: | | ||
mkdir -p ./.debpkg/usr/bin | ||
cp ./hamdeck ./.debpkg/usr/bin/hamdeck | ||
chmod +x ./.debpkg/usr/bin/hamdeck | ||
mkdir -p ./.debpkg/usr/share/hamdeck | ||
cp ./example_conf.json ./.debpkg/usr/share/hamdeck/example_conf.json | ||
- name: Create deb package | ||
run: ./build-debpkg.sh ${{ steps.version_number.outputs.version_number }} | ||
|
||
- id: package_filename | ||
run: echo "::set-output name=package_filename::$(ls ./hamdeck*.deb | head -n 1)" | ||
|
||
- name: 'Upload package for linux_x86_64' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: hamdeck-package | ||
path: ./hamdeck*.deb | ||
|
||
- name: Upload package to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ steps.package_filename.outputs.package_filename }} | ||
tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
sed -i -E "s#!THE_VERSION!#$1#" ./.debpkg/DEBIAN/control | ||
dpkg-deb --build ./.debpkg . |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.