Skip to content

Commit d449125

Browse files
committed
ci: add release workflow + updates
1 parent a49b5d0 commit d449125

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
tags:
66
- "v*" # dispara quando fizer push de uma tag vX.Y.Z
7-
workflow_dispatch: # permite correr manualmente
7+
workflow_dispatch: # permite correr manualmente (build artefactos mas não publica release)
88

99
concurrency:
1010
group: release-${{ github.ref }}
@@ -58,7 +58,7 @@ jobs:
5858
mkdir -p "$OUTDIR"
5959
BIN="${APP_NAME}${{ matrix.ext }}"
6060
61-
# Ajusta estes -X para os nomes das tuas vars em main.go se forem diferentes:
61+
# Ajusta estes -X se mudares os nomes das tuas vars em main.go
6262
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -trimpath \
6363
-ldflags "-s -w \
6464
-X 'main.buildVersion=${{ steps.meta.outputs.version }}' \
@@ -94,6 +94,7 @@ jobs:
9494
path: dist/**
9595

9696
release:
97+
if: startsWith(github.ref, 'refs/tags/')
9798
name: Create GitHub Release
9899
runs-on: ubuntu-latest
99100
needs: build

cmd/sharepoint-client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
// Nome e versão por omissão (podem ser sobrepostos por ldflags no build)
2727
const appName = "sharepoint-client"
28-
const defaultVersion = "v1.0.0"
28+
const defaultVersion = "v1.0.3"
2929

3030
// Estes três são **injetados** pelo build (ldflags -X main.buildVersion=... etc.)
3131
// Valores de fallback para execuções locais (go run / go build sem ldflags).

0 commit comments

Comments
 (0)