Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 596bb7ed3d |
@@ -1,50 +1,51 @@
|
|||||||
name: Agent Release
|
name: Agent Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "agent/v*"
|
- "agent/v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-docker
|
||||||
steps:
|
container: node:26
|
||||||
- name: Checkout
|
steps:
|
||||||
uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.23"
|
go-version: "1.26"
|
||||||
cache: true
|
cache: true
|
||||||
cache-dependency-path: agent/go.sum
|
cache-dependency-path: agent/go.sum
|
||||||
|
|
||||||
- name: Extract version
|
- name: Extract version
|
||||||
id: version
|
id: version
|
||||||
run: echo "VERSION=${GITHUB_REF_NAME#agent/}" >> $GITHUB_OUTPUT
|
run: echo "VERSION=${GITHUB_REF_NAME#agent/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: agent
|
working-directory: agent
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.version.outputs.VERSION }}
|
VERSION: ${{ steps.version.outputs.VERSION }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
GOOS=linux GOARCH=amd64 go build \
|
GOOS=linux GOARCH=amd64 go build \
|
||||||
-ldflags="-s -w -X main.Version=${VERSION}" \
|
-ldflags="-s -w -X main.Version=${VERSION}" \
|
||||||
-o dist/keymanager-agent-linux-amd64 ./cmd
|
-o dist/keymanager-agent-linux-amd64 ./cmd
|
||||||
GOOS=linux GOARCH=arm64 go build \
|
GOOS=linux GOARCH=arm64 go build \
|
||||||
-ldflags="-s -w -X main.Version=${VERSION}" \
|
-ldflags="-s -w -X main.Version=${VERSION}" \
|
||||||
-o dist/keymanager-agent-linux-arm64 ./cmd
|
-o dist/keymanager-agent-linux-arm64 ./cmd
|
||||||
|
|
||||||
- name: Checksums
|
- name: Checksums
|
||||||
working-directory: agent/dist
|
working-directory: agent/dist
|
||||||
run: sha256sum keymanager-agent-linux-amd64 keymanager-agent-linux-arm64 > checksums.txt
|
run: sha256sum keymanager-agent-linux-amd64 keymanager-agent-linux-arm64 > checksums.txt
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: https://gitea.com/actions/gitea-release-action@v1
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
files: |
|
files: |
|
||||||
agent/dist/keymanager-agent-linux-amd64
|
agent/dist/keymanager-agent-linux-amd64
|
||||||
agent/dist/keymanager-agent-linux-arm64
|
agent/dist/keymanager-agent-linux-arm64
|
||||||
agent/dist/checksums.txt
|
agent/dist/checksums.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user