Skip to content

Commit

Permalink
chg: update release workflow with deb package artifacts
Browse files Browse the repository at this point in the history
* also enable deb package builds on push to main

Signed-off-by: Stephen Arnold <[email protected]>
  • Loading branch information
sarnold committed Oct 13, 2024
1 parent 3f69e27 commit 7e2790d
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Debian packages

on:
workflow_dispatch:
#push:
#branches: [ main ]
push:
branches: [ main ]
pull_request:

jobs:
Expand Down
85 changes: 84 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,92 @@ jobs:
name: packages
path: dist

get_version:
name: Get version info
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
outputs:
version: ${{ steps.git_ver.outputs.version }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get package version
id: git_ver
run: |
version=$(git describe --tags | sed -e "s|-g|+g|")
echo "Version from git: ${version}"
echo "version=${version}" >> $GITHUB_OUTPUT
build_debs:
name: ${{ matrix.name }}
runs-on: ubuntu-22.04
needs: [get_version]

strategy:
fail-fast: false
matrix:
name: [
x64_bookworm,
x64_trixie,
x64_sid,
]

include:
- name: x64_bookworm
dist: bookworm

- name: x64_trixie
dist: trixie

- name: x64_sid
dist: sid

steps:
- name: Check github variables
env:
VERSION: ${{ needs.get_version.outputs.version }}
run: |
echo "Package version from git: ${VERSION}"
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch debian files
run: |
wget https://launchpad.net/~nerdboy/+archive/ubuntu/embedded/+sourcefiles/timew-addons/0.1.1-1ubuntu1.22.04.1/timew-addons_0.1.1-1ubuntu1.22.04.1.debian.tar.xz
tar xf timew-addons_0.1.1-1ubuntu1.22.04.1.debian.tar.xz && rm *debian.tar.xz
ls
- name: Install deps and update debian changelog
run: |
sudo apt-get update
sudo apt-get install devscripts
debchange -v ${{ needs.get_version.outputs.version }}-${{ matrix.dist }} -b -M --distribution ${{ matrix.dist }} "ci build"
- name: Build deb packages
uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
docker-image: "debian:${{ matrix.dist }}-slim"
buildpackage-opts: --build=binary --no-sign
extra-build-deps: git

- name: Upload deb files
uses: actions/upload-artifact@v4
with:
name: "timew-addons_${{ needs.get_version.outputs.version }}-${{ matrix.dist }}"
path: ./debian/artifacts/*.deb

create_release:
name: Create Release
needs: [wheels]
needs: [build_debs, wheels]
runs-on: ubuntu-22.04

steps:
Expand Down

0 comments on commit 7e2790d

Please sign in to comment.