Skip to content

Update version.yml

Update version.yml #5

Workflow file for this run

name: Agent Release
on:
push:
tags: [ 'v*' ]
paths:
- 'agent/agent/**'
jobs:
build:
name: Build
runs-on: signing
steps:
- name: Check out code into the right branch
uses: actions/checkout@v4
with:
ref: rc
- name: Configure Key
working-directory: ./agent/agent
env:
REPLACE_KEY: ${{ secrets.AGENT_SECRET_PREFIX }}
run: sed -i "s/const REPLACE_KEY string = \"/const REPLACE_KEY string = \"$REPLACE_KEY/g" "configuration/const.go"
- name: Build for Linux
working-directory: ./agent/agent
env:
GOOS: linux
GOARCH: amd64
run: go build -o utmstack_agent_service -v .
- name: Build and sign for Windows
working-directory: ./agent/agent
env:
GOOS: windows
GOARCH: amd64
SIGN_KEY: ${{ secrets.SIGN_KEY }}
SIGN_CERT: ${{ env.SIGN_CERT }}
SIGN_CONTAINER: ${{ secrets.SIGN_CONTAINER }}
run: |
go build -o utmstack_agent_service.exe -v .
signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /f "$SIGN_CERT" /csp "eToken Base Cryptographic Provider" /k "[{{${SIGN_KEY}}}]=${SIGN_CONTAINER}" "utmstack_agent_service.exe"
- name: Run Python script for deploy to Google
working-directory: ".github/scripts"
env:
GCP_KEY: ${{ secrets.GCP_KEY }}
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///g')
python agent-deploy.py $TAG agent utmstack_agent_service