Skip to content

Package Hermes Agent as a built-in guest (#136) #14

Package Hermes Agent as a built-in guest (#136)

Package Hermes Agent as a built-in guest (#136) #14

Workflow file for this run

# SPDX-FileCopyrightText: Copyright 2025 Stacklok, Inc.
# SPDX-License-Identifier: Apache-2.0
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
packages: write
env:
GH_TOKEN: ${{ github.token }}
jobs:
build:
name: Build (${{ matrix.os }}-${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: linux
arch: amd64
runner: ubuntu-latest
- os: linux
arch: arm64
runner: ubuntu-24.04-arm
- os: darwin
arch: arm64
runner: macos-15
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Install Task
uses: go-task/setup-task@v2
- name: Build bbox
run: task build
- name: Verify version
run: |
echo "Binary reports: $(./bin/bbox --version)"
echo "Expected tag: ${{ github.ref_name }}"
- name: Package binary
run: |
mkdir -p dist
tar -czf dist/bbox-${{ matrix.os }}-${{ matrix.arch }}.tar.gz -C bin bbox
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: bbox-${{ matrix.os }}-${{ matrix.arch }}
path: dist/bbox-${{ matrix.os }}-${{ matrix.arch }}.tar.gz
release:
name: Create Release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
merge-multiple: true
- name: Generate checksums
run: sha256sum bbox-*.tar.gz > sha256sums.txt
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then
gh release upload "${{ github.ref_name }}" --clobber \
bbox-*.tar.gz sha256sums.txt
else
gh release create "${{ github.ref_name }}" --generate-notes \
bbox-*.tar.gz sha256sums.txt
fi