Merge pull request #1 from taigrr/cd/goreleaser

build: add GoReleaser Pro config and release workflow
This commit is contained in:
2026-03-11 17:50:57 -04:00
committed by GitHub
3 changed files with 100 additions and 0 deletions

30
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

69
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,69 @@
version: 2
project_name: github-to-signal
before:
hooks:
- go generate ./...
- go mod tidy
builds:
- id: github-to-signal
main: .
binary: github-to-signal
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.commit={{.Commit}}
- -X main.date={{.Date}}
archives:
- id: default
formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
files:
- LICENSE
- README.md
- config.example.toml
- deploy/*
nfpms:
- id: packages
package_name: github-to-signal
vendor: taigrr
homepage: https://github.com/taigrr/github-to-signal
maintainer: Tai Groot <tai@taigrr.com>
description: GitHub webhook to Signal notifications
license: 0BSD
formats:
- deb
- rpm
contents:
- src: deploy/github-to-signal.service
dst: /usr/lib/systemd/user/github-to-signal.service
type: config
- src: deploy/signal-cli-bot.service
dst: /usr/lib/systemd/user/signal-cli-bot.service
type: config
- src: config.example.toml
dst: /etc/github-to-signal/config.example.toml
type: config
checksum:
name_template: checksums.txt
changelog:
use: github-native
release:
github:
owner: taigrr
name: github-to-signal

View File

@@ -1,4 +1,5 @@
server {
listen 80;
# listen 443 ssl;
server_name ghwebhook.example.com;