Author SHA1 Message Date
jmug 3b29c2cb1d chore: Set up goreleaser to build and release binaries.
build-secretsserver / build (push) Successful in 1m23s
release-clis / release (push) Successful in 2m10s
2026-10-29 13:01:15 -07:00
jmugandjmug 36af437794 ci: Build secrets server on PRs, publish on releases. (#1)
build-secretsserver / build (push) Successful in 45s
Co-authored-by: jmug <u.g.a.mariano@gmail.com>
Reviewed-on: #1
2026-10-25 03:10:37 -07:00
5 changed files with 119 additions and 0 deletions

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
name: build-secretsserver
on:
push:
branches:
- "main"
# Only run on release tags.
tags:
- "v*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# Unfortunately gotta use a PAT,
# workflow tokens can't access the registry yet.
- name: Log in to the registry
if: ${{ gitea.ref_type == 'tag' }}
uses: docker/login-action@v3
with:
registry: git.handmadecities.com
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Compute tags
id: meta
uses: docker/metadata-action@v5
with:
images: git.handmadecities.com/${{ gitea.repository }}/secretsserver
tags: |
type=semver,pattern={{version}}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: docker/secretsserver/Dockerfile
context: .
# Only push on releases.
push: ${{ gitea.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
+26
View File
@@ -0,0 +1,26 @@
name: release-clis
on:
push:
tags:
- "v*"
permissions:
code: read
releases: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0
with:
args: release --clean
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
+2
View File
@@ -118,3 +118,5 @@ tags
# Persistent undo # Persistent undo
[._]*.un~ [._]*.un~
# Added by goreleaser init:
dist/
+47
View File
@@ -0,0 +1,47 @@
version: 2
gitea_urls:
api: https://git.handmadecities.com/api/v1
download: https://git.handmadecities.com/
before:
hooks:
- go mod tidy
builds:
- id: hmpki
main: ./cmd/hmpki
binary: hmpki
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- arm64
- amd64
- id: hmsecrets
main: ./cmd/hmsecrets
binary: hmsecrets
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- arm64
- amd64
archives:
- formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
+1
View File
@@ -2,3 +2,4 @@
go = "1.27.2" go = "1.27.2"
"go:golang.org/x/tools/cmd/goimports" = "latest" "go:golang.org/x/tools/cmd/goimports" = "latest"
"go:golang.org/x/tools/gopls" = "latest" "go:golang.org/x/tools/gopls" = "latest"
goreleaser = "2.19.0"