Skip to content

Commit

Permalink
Merge pull request #21 from feuerrot/goreleaser
Browse files Browse the repository at this point in the history
ci: use go-semantic-release with goreleaser-hook
  • Loading branch information
feuerrot authored Nov 28, 2022
2 parents c00e7d4 + bf73f04 commit 0557753
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 84 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/docker.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: semantic release

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: go-semantic-release/action@v1
with:
hooks: goreleaser
prerelease: true
force-bump-patch-version: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 0 additions & 30 deletions .github/workflows/semrel.yml

This file was deleted.

31 changes: 16 additions & 15 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
before:
hooks:
- go mod download
- go mod verify
builds:
- goos:
- linux
- targets:
- linux_amd64
binary: soundboard

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
name_template: '{{ .ProjectName }}_v{{ .Version }}_checksums.txt'

dockers:
- image_templates:
- "ghcr.io/feuerrot/gomumblesoundboard:latest"
- "ghcr.io/feuerrot/gomumblesoundboard:{{.Version}}"
build_flag_templates:
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source=https://github.com/feuerrot/gomumblesoundboard.git"

0 comments on commit 0557753

Please sign in to comment.