ci(deploy): package archied/archie-gateway/archie-state-store/archie-playbooks as a linux/amd64 zip (archie-core-8cda.4.7.1)
New dist-zip job, independent of build-and-push (no change to the archied/archie-agent Docker image jobs). Triggers on any archied/vX.Y.Z tag, so a gateway-only release (RUNTIME=skip) still produces it, keyed to the archied version alone -- these binaries aren't in tools/release.sh's two-component split and don't need to be for this. archie-agent is deliberately excluded: it only ever runs inside the Docker image build-and-push already publishes, never as a host binary. Zip contains the four linux/amd64 binaries, the new deployments/INSTRUCTIONS.md (quickstart + deployment-profile/systemd pointers), and CHANGELOG.md/CHANGELOG.archied.md/CHANGELOG.archie.md. README.md is included only if present -- it doesn't exist in this repo yet, so omitted for now rather than fabricated here. Verified locally: all four binaries build clean under GOOS=linux GOARCH=amd64 CGO_ENABLED=0 (modernc.org/sqlite is pure Go, no cgo sqlite driver to worry about), and the assembled zip's contents match what the workflow step produces.
This commit is contained in:
1 parent
89c1c53ed6
commit
d64f2b12a5
2 files changed
+124
No files matched your search
@@ -177,3 +177,64 @@ jobs:
|
||||
RUNTIME_VERSION=${{ steps.versions.outputs.runtime }}
|
||||
cache-from: type=gha,scope=archie-agent
|
||||
cache-to: type=gha,mode=max,scope=archie-agent
|
||||
|
||||
# Packages the host-run binaries (archied, archie-gateway,
|
||||
# archie-state-store, archie-playbooks) as a linux/amd64 zip for a
|
||||
# non-Docker install. Independent of build-and-push: it never touches the
|
||||
# archied/archie-agent image jobs, and a gateway-only release (no
|
||||
# archie/v* tag) still produces this zip -- it's keyed to the archied tag
|
||||
# alone. archie-agent is deliberately excluded: it only ever runs inside
|
||||
# the Docker image build-and-push already publishes, never as a host
|
||||
# binary (archie-core-8cda.4.7.1).
|
||||
dist-zip:
|
||||
needs: gate
|
||||
if: startsWith(github.ref, 'refs/tags/archied/v')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Resolve archied version
|
||||
id: version
|
||||
run: echo "version=${GITHUB_REF#refs/tags/archied/v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build linux/amd64 binaries
|
||||
env:
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
CGO_ENABLED: "0"
|
||||
run: |
|
||||
set -e
|
||||
ldflags_archied="-X github.com/samcharles93/archie-core/internal/app/archied.gatewayVersion=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary"
|
||||
ldflags_gateway="-X github.com/samcharles93/archie-core/internal/app/archied.gatewayVersion=${{ steps.version.outputs.version }} -X github.com/samcharles93/archie-core/internal/installtype.buildType=binary"
|
||||
mkdir -p dist
|
||||
go build -ldflags "$ldflags_archied" -o dist/archied ./cmd/archied
|
||||
go build -ldflags "$ldflags_gateway" -o dist/archie-gateway ./cmd/archie-gateway
|
||||
go build -o dist/archie-state-store ./cmd/archie-state-store
|
||||
go build -o dist/archie-playbooks ./cmd/archie-playbooks
|
||||
|
||||
- name: Assemble distribution zip
|
||||
id: zip
|
||||
run: |
|
||||
set -e
|
||||
name="archie-core-archied-v${{ steps.version.outputs.version }}-linux-amd64"
|
||||
mkdir -p "$name"
|
||||
cp dist/archied dist/archie-gateway dist/archie-state-store dist/archie-playbooks "$name/"
|
||||
cp deployments/INSTRUCTIONS.md CHANGELOG.md CHANGELOG.archied.md CHANGELOG.archie.md "$name/"
|
||||
# README.md doesn't exist yet in this repo; include it once it does
|
||||
# rather than fail the release on its absence.
|
||||
[ -f README.md ] && cp README.md "$name/"
|
||||
zip -r "$name.zip" "$name"
|
||||
echo "name=$name" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Upload distribution zip
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.zip.outputs.name }}
|
||||
path: ${{ steps.zip.outputs.name }}.zip
|
||||
retention-days: 90
|
||||
Reference in new issue
Block a user