Files
jarl/.gitea/workflows/release.yml
T
abrown38andClaude Opus 5.5 4d00be53c3
release / release (push) Successful in 7m7s
Split the packages, publish releases from Gitea Actions, release 0.1.0
make deb now builds two packages: jarl-cli (the CLI, its completion and
the ACME hooks, no scripts) and jarl (the server), which depends on
jarl-cli of the same version.

Pushing a v* tag runs .gitea/workflows/release.yml: it tests, builds the
tarballs, the CLI for Linux, macOS and Windows (make cli-dist) and the
.debs for amd64 and arm64, then scripts/gitea-release.sh creates the
Gitea release and uploads the .debs to the Debian package registry, so
servers install and upgrade with apt. The stats package's inode lookup
is split by OS so the CLI builds for Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 08:40:56 +00:00

62 lines
1.8 KiB
YAML

# Builds and publishes a release when a version tag (v0.2.0, v1.0.0-rc.1)
# is pushed:
# * a Gitea release with the CHANGELOG notes, the linux tarballs, the CLI
# for Linux, macOS and Windows, the .debs and SHA256SUMS;
# * the .debs (amd64, arm64) in the owner's Debian package registry.
#
# Needs a repository secret RELEASE_TOKEN: an access token of a user who
# can write to the repository, with the write:repository and write:package
# scopes. docs/development.md ("Releasing") has the steps.
name: release
on:
push:
tags: ["v*"]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check the tag against VERSION and CHANGELOG.md
run: |
version=$(cat VERSION)
if [ "$GITHUB_REF_NAME" != "v$version" ]; then
echo "::error::tag $GITHUB_REF_NAME does not match VERSION ($version)"
exit 1
fi
if ! grep -q "^## \[$version\]" CHANGELOG.md; then
echo "::error::CHANGELOG.md has no '## [$version]' section"
exit 1
fi
- name: Tools
run: |
missing=
for t in jq dpkg-deb curl; do command -v $t >/dev/null || missing="$missing $t"; done
if [ -n "$missing" ]; then
sudo=; [ "$(id -u)" = 0 ] || sudo=sudo
$sudo apt-get update -qq && $sudo apt-get install -y -qq jq dpkg curl
fi
- name: Test
run: make test
- name: Build
run: |
export DEB_MAINTAINER="$(git log -1 --format='%an <%ae>')"
make dist
make cli-dist
make deb DEB_ARCH=amd64
make deb DEB_ARCH=arm64
- name: Publish
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: scripts/gitea-release.sh