-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (29 loc) · 1.06 KB
/
release.yml
File metadata and controls
34 lines (29 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 0.1.0)'
required: true
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read version from file
id: version
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Create Release
uses: whilesmart/workflows/go/release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
binary_name: flatrun-agent
build_path: ./cmd/agent
version: ${{ github.event.inputs.version || steps.version.outputs.version }}
platforms: '["linux/amd64", "linux/arm64", "darwin/amd64", "darwin/arm64"]'
ldflags: "-X github.com/flatrun/agent/pkg/version.Version=${{ github.event.inputs.version || steps.version.outputs.version }} -X github.com/flatrun/agent/pkg/version.BuildTime=$(date -u +%Y-%m-%d_%H:%M:%S) -X github.com/flatrun/agent/pkg/version.GitCommit=${{ github.sha }}"