Skip to content

chore(release): publish public TLS API docs update #5

chore(release): publish public TLS API docs update

chore(release): publish public TLS API docs update #5

Workflow file for this run

name: release-public
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
verify_snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Verify public snapshot marker
run: |
git show -s --format=%B "${GITHUB_SHA}" | grep -q '^certbro-public-snapshot: true$'
build:
needs: verify_snapshot
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build binary
env:
CGO_ENABLED: "0"
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
mkdir -p dist
go build \
-trimpath \
-ldflags "-s -w -X main.version=${GITHUB_REF_NAME} -X main.commit=${GITHUB_SHA} -X main.buildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-o "dist/certbro" \
./cmd/certbro
tar -C dist -czf "dist/certbro_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz" certbro
rm -f dist/certbro
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: certbro-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/certbro_${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
- name: Prepare release files
run: |
find dist -type f -name '*.tar.gz' -exec cp {} dist/ \;
cd dist
sha256sum certbro_*.tar.gz > checksums.txt
- name: Publish release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
prerelease: false
files: |
dist/certbro_*.tar.gz
dist/checksums.txt