mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-18 09:37:28 +08:00
fix build version
This commit is contained in:
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -32,12 +32,27 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y zip
|
sudo apt-get install -y zip
|
||||||
|
|
||||||
|
- name: Resolve build version
|
||||||
|
id: ver
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.tag }}" ]; then
|
||||||
|
raw="${{ inputs.tag }}"
|
||||||
|
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
||||||
|
raw="${GITHUB_REF_NAME}"
|
||||||
|
else
|
||||||
|
raw="$(git describe --tags --always --dirty 2>/dev/null || echo dev)"
|
||||||
|
fi
|
||||||
|
version="${raw#v}"
|
||||||
|
echo "raw=$raw" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Build version: $version (from $raw)"
|
||||||
|
|
||||||
- name: Build all platforms
|
- name: Build all platforms
|
||||||
run: |
|
run: |
|
||||||
make build-all BUILD_TARGETS="linux/amd64 linux/arm64 linux/riscv64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64"
|
make build-all VERSION="${{ steps.ver.outputs.version }}" BUILD_TARGETS="linux/amd64 linux/arm64 linux/riscv64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64"
|
||||||
|
|
||||||
- name: Package artifacts
|
- name: Package artifacts
|
||||||
run: make package-all BUILD_TARGETS="linux/amd64 linux/arm64 linux/riscv64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64"
|
run: make package-all VERSION="${{ steps.ver.outputs.version }}" BUILD_TARGETS="linux/amd64 linux/arm64 linux/riscv64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64"
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ import (
|
|||||||
//go:embed workspace
|
//go:embed workspace
|
||||||
var embeddedFiles embed.FS
|
var embeddedFiles embed.FS
|
||||||
|
|
||||||
const version = "0.1.0"
|
var version = "0.1.0"
|
||||||
|
var buildTime = "unknown"
|
||||||
|
|
||||||
const logo = "🦞"
|
const logo = "🦞"
|
||||||
const gatewayServiceName = "clawgo-gateway.service"
|
const gatewayServiceName = "clawgo-gateway.service"
|
||||||
const envRootGranted = "CLAWGO_ROOT_GRANTED"
|
const envRootGranted = "CLAWGO_ROOT_GRANTED"
|
||||||
|
|||||||
Reference in New Issue
Block a user