mirror of
https://github.com/taigrr/github-to-signal.git
synced 2026-04-02 03:09:09 -07:00
build: add GoReleaser Pro config and release workflow
This commit is contained in:
30
.github/workflows/release.yaml
vendored
Normal file
30
.github/workflows/release.yaml
vendored
Normal 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
69
.goreleaser.yaml
Normal 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
|
||||||
Reference in New Issue
Block a user