chore: add goreleaser release setup
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
name: release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
goreleaser:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.24.2"
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v7
|
||||||
|
with:
|
||||||
|
distribution: goreleaser
|
||||||
|
version: "~> v2"
|
||||||
|
args: release --clean
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
AUR_KEY: ${{ secrets.AUR_KEY }}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
config.toml
|
config.toml
|
||||||
cookies.json
|
cookies.json
|
||||||
|
dist/
|
||||||
|
|||||||
@@ -0,0 +1,101 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
project_name: parasocial
|
||||||
|
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod download
|
||||||
|
|
||||||
|
builds:
|
||||||
|
- id: parasocial
|
||||||
|
main: ./cmd/parasocial
|
||||||
|
binary: parasocial
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
- arm
|
||||||
|
goarm:
|
||||||
|
- "7"
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: arm
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w -buildid=
|
||||||
|
|
||||||
|
source:
|
||||||
|
enabled: true
|
||||||
|
name_template: "{{ .ProjectName }}_{{ .Version }}_source"
|
||||||
|
format: tar.gz
|
||||||
|
prefix_template: "{{ .ProjectName }}_{{ .Version }}/"
|
||||||
|
|
||||||
|
archives:
|
||||||
|
- id: parasocial
|
||||||
|
ids:
|
||||||
|
- parasocial
|
||||||
|
formats:
|
||||||
|
- tar.gz
|
||||||
|
name_template: >-
|
||||||
|
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
formats:
|
||||||
|
- zip
|
||||||
|
files:
|
||||||
|
- README.md
|
||||||
|
- LICENSE
|
||||||
|
|
||||||
|
checksum:
|
||||||
|
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
|
||||||
|
algorithm: sha256
|
||||||
|
|
||||||
|
release:
|
||||||
|
github:
|
||||||
|
owner: ruinivist
|
||||||
|
name: parasocial
|
||||||
|
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- "^docs:"
|
||||||
|
- "^test:"
|
||||||
|
- "^chore:"
|
||||||
|
|
||||||
|
aur_sources:
|
||||||
|
- name: parasocial
|
||||||
|
homepage: "https://github.com/ruinivist/parasocial"
|
||||||
|
description: "A CLI-only lightweight Twitch channel points miner."
|
||||||
|
maintainers:
|
||||||
|
- "ruinivist <ruinivist@proton.me>"
|
||||||
|
license: "MIT"
|
||||||
|
private_key: "{{ .Env.AUR_KEY }}"
|
||||||
|
git_url: "ssh://aur@aur.archlinux.org/parasocial.git"
|
||||||
|
skip_upload: auto
|
||||||
|
disable: "{{ .IsSnapshot }}"
|
||||||
|
provides:
|
||||||
|
- parasocial
|
||||||
|
conflicts:
|
||||||
|
- parasocial
|
||||||
|
makedepends:
|
||||||
|
- go
|
||||||
|
- git
|
||||||
|
build: |-
|
||||||
|
cd "${pkgname}_${pkgver}"
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
export GOFLAGS="-trimpath -mod=readonly -modcacherw"
|
||||||
|
go build -ldflags="-s -w -buildid=" -o parasocial ./cmd/parasocial
|
||||||
|
package: |-
|
||||||
|
cd "${pkgname}_${pkgver}"
|
||||||
|
install -Dm755 ./parasocial "${pkgdir}/usr/bin/parasocial"
|
||||||
|
install -Dm644 ./LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
commit_msg_template: "Update {{ .ProjectName }} to {{ .Tag }}"
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 ruinivist
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
Reference in New Issue
Block a user