Skip to content

chore: merge develop into main (#143) #7

chore: merge develop into main (#143)

chore: merge develop into main (#143) #7

name: arm_deb_packager
on:
push:
branches:
- 'main'
paths:
- '**'
tags:
- 'v*.*.*'
- 'v*.*.*-*'
jobs:
build:
permissions:
id-token: write
contents: write
runs-on:
labels: arm-runner-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.x
# Variables
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: adding version
run: |
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
- name: go mod download
run: go mod download
- name: Build the binary
run: make build
- name: making directory structure
run: mkdir -p packaging/deb/aggkit/usr/bin/
- name: copying necessary binary for arm64
run: cp -rp target/aggkit packaging/deb/aggkit/usr/bin/aggkit
# Control file creation
- name: Create control file
run: |
echo "Package: aggkit" >> packaging/deb/aggkit/DEBIAN/control
echo "Version: ${{ env.VERSION }}" >> packaging/deb/aggkit/DEBIAN/control
echo "Section: base" >> packaging/deb/aggkit/DEBIAN/control
echo "Priority: optional" >> packaging/deb/aggkit/DEBIAN/control
echo "Architecture: arm64" >> packaging/deb/aggkit/DEBIAN/control
echo "Maintainer: [email protected]" >> packaging/deb/aggkit/DEBIAN/control
echo "Description: aggkit binary package" >> packaging/deb/aggkit/DEBIAN/control
- name: Creating package for binary for aggkit ${{ env.ARCH }}
run: cp -rp packaging/deb/aggkit packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64
- name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64
- name: create checksum for the arm64 package
run: cd packaging/deb/ && sha256sum aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
env:
ARCH: arm64
- name: Release aggkit Packages
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: true
files: |
packaging/deb/aggkit**.deb
packaging/deb/aggkit**.deb.checksum