Skip to content

Commit

Permalink
add tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jul 15, 2024
1 parent 08a9427 commit bdc61b9
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 39 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/go-ossf-slsa3-publish.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
push:
tags:
# so a vX.Y.Z-test1 doesn't trigger build
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-pre*'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # pin@v1
- uses: docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # pin@v1
- name: Set up Go
uses: actions/setup-go@v4 # pin@v3
with:
go-version: '1.22'
check-latest: true
- name: Log in to Docker Hub
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # pin@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: "GoReleaser Action"
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # pin@v4.3.0
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ go.work.sum


.golangci.yml
.goreleaser.yaml
gorepl
grol

Expand Down
96 changes: 96 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
version: 2

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
tags:
- no_net
- no_json
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
gomod:
proxy: true
mod: mod
archives:
- format_overrides:
- goos: windows
format: zip
- goos: darwin
format: zip
dockers:
- image_templates: ["fortio/{{ .ProjectName }}:{{ .Version }}-amd64"]
use: buildx
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
- image_templates: ["fortio/{{ .ProjectName }}:{{ .Version }}-arm64"]
use: buildx
goarch: arm64
build_flag_templates:
- --platform=linux/arm64
docker_manifests:
-
name_template: fortio/{{ .ProjectName }}:{{ .Version }}
image_templates:
- fortio/{{ .ProjectName }}:{{ .Version }}-amd64
- fortio/{{ .ProjectName }}:{{ .Version }}-arm64
-
name_template: fortio/{{ .ProjectName }}:latest
image_templates:
- fortio/{{ .ProjectName }}:{{ .Version }}-amd64
- fortio/{{ .ProjectName }}:{{ .Version }}-arm64
release:
prerelease: auto
mode: append
# .goreleaser.yaml
brews:
-
# GitHub/GitLab repository to push the formula to
repository:
owner: fortio
name: homebrew-tap

# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: goreleaserbot
email: bot@goreleaser.com

# The project name and current git tag are used in the format string.
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"

# Folder inside the repository to put the formula.
# Default is the root folder.
directory: Formula

# Your app's homepage.
# Default is empty.
homepage: "https://fortio.org/"

# Template of your app's description.
# Default is empty.
description: "{{ .Env.TAP_DESCRIPTION }}"

# SPDX identifier of your app's license.
# Default is empty.
license: "Apache-2.0"

# So you can `brew test` your formula.
# Default is empty.
test: |
assert_match version.to_s, shell_output("#{bin}/{{ .ProjectName }} -version")

0 comments on commit bdc61b9

Please sign in to comment.