Skip to content

Commit ae40d58

Browse files
committed
first separate release for docker build
1 parent bbb3f7a commit ae40d58

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

.github/workflows/goreleaser.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
# run only against tags
6+
tags:
7+
- '*'
8+
9+
permissions:
10+
contents: write
11+
# packages: write
12+
# issues: write
13+
14+
jobs:
15+
goreleaser:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- run: git fetch --force --tags
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version: stable
25+
# More assembly might be required: Docker logins, GPG, etc. It all depends
26+
# on your needs.
27+
- uses: goreleaser/goreleaser-action@v5
28+
with:
29+
# either 'goreleaser' (default) or 'goreleaser-pro':
30+
distribution: goreleaser
31+
version: latest
32+
args: release --clean
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
36+
# distribution:
37+
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

.goreleaser.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
builds:
8+
- id: "docker-plugin"
9+
binary: docker-plugin
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- darwin
15+
goarch:
16+
- arm64
17+
- amd64
18+
main: ./
19+
archives:
20+
- name_template: >-
21+
{{ .Binary }}_
22+
{{- title .Os }}_
23+
{{- if eq .Arch "amd64" }}x86_64
24+
{{- else if eq .Arch "linux" }}Linux
25+
{{- else if eq .Arch "darwin" }}MacOS
26+
{{- else }}{{ .Arch }}{{ end }}
27+
format: binary
28+
29+
checksum:
30+
name_template: 'checksums.txt'
31+
snapshot:
32+
name_template: "{{ incpatch .Version }}-next"
33+
changelog:
34+
sort: asc
35+
filters:
36+
exclude:
37+
- '^docs_new:'
38+
- '^test:'
39+
40+
# modelines, feel free to remove those if you don't want/use them:
41+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
42+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
File renamed without changes.

0 commit comments

Comments
 (0)