Skip to content

bump to 3.0.9

bump to 3.0.9 #17

Workflow file for this run

name: Build and publish go-modules package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Install build dependencies
run: sudo apt-get install -y dpkg-dev
- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build
run: cross build --release --target aarch64-unknown-linux-gnu
- name: Build .deb
run: |
set -euo pipefail
VERSION="${{ steps.version.outputs.version }}"
PACKAGE=go-modules
ARCH=arm64
BUILD="${RUNNER_TEMP}/${PACKAGE}_${VERSION}_${ARCH}"
DIST="${RUNNER_TEMP}/dist"
mkdir -p "${BUILD}/DEBIAN" "${BUILD}/usr/bin" "${DIST}"
install -Dm755 "target/aarch64-unknown-linux-gnu/release/go-modules" \
"${BUILD}/usr/bin/go-modules"
cat > "${BUILD}/DEBIAN/control" << CONTROL
Package: ${PACKAGE}
Version: ${VERSION}
Architecture: ${ARCH}
Maintainer: GOcontroll B.V. <info@gocontroll.com>
Depends: libc-bin
Section: utils
Priority: optional
Homepage: https://gocontroll.com
Description: Module firmware management for GOcontroll Moduline controllers
Scans, updates and overwrites firmware on GOcontroll Moduline controller
modules via SPI.
CONTROL
dpkg-deb -Zxz --build --root-owner-group "${BUILD}" \
"${DIST}/${PACKAGE}_${VERSION}_${ARCH}.deb"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: ${{ runner.temp }}/dist/go-modules_${{ steps.version.outputs.version }}_arm64.deb
generate_release_notes: true
- name: Trigger go-apt index rebuild
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.APT_DISPATCH_TOKEN }}
repository: GOcontroll/go-apt
event-type: rebuild-index
client-payload: |
{
"package": "go-modules",
"version": "${{ steps.version.outputs.version }}",
"arch": "arm64",
"deb_url": "https://github.com/GOcontroll/go-modules/releases/download/${{ github.ref_name }}/go-modules_${{ steps.version.outputs.version }}_arm64.deb"
}