all repos

mugit @ a4a6674

馃惍 git server that your cow will love
2 files changed, 64 insertions(+), 0 deletions(-)
chore: setup goreleaser
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-02-05 23:41:51 +0200
Authored at: 2026-02-05 22:39:42 +0200
Change ID: smuuqplupuztuxttrkmzkyknyoptwroo
Parent: 39dba84
A .github/workflows/goreleaser.yml
路路路
        
        1
        +name: goreleaser

      
        
        2
        +

      
        
        3
        +on:

      
        
        4
        +  push:

      
        
        5
        +    tags:

      
        
        6
        +      - "*"

      
        
        7
        +

      
        
        8
        +permissions:

      
        
        9
        +  contents: write

      
        
        10
        +

      
        
        11
        +

      
        
        12
        +jobs:

      
        
        13
        +  goreleaser:

      
        
        14
        +    runs-on: ubuntu-latest

      
        
        15
        +    steps:

      
        
        16
        +      - uses: actions/checkout@v5

      
        
        17
        +        with:

      
        
        18
        +          fetch-depth: 0

      
        
        19
        +

      
        
        20
        +      - name: Set up Go

      
        
        21
        +        uses: actions/setup-go@v5

      
        
        22
        +

      
        
        23
        +      - name: Run GoReleaser

      
        
        24
        +        uses: goreleaser/goreleaser-action@v6

      
        
        25
        +        with:

      
        
        26
        +          distribution: goreleaser

      
        
        27
        +          version: '~> v2'

      
        
        28
        +          args: release --clean

      
        
        29
        +        env:

      
        
        30
        +          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      
A .goreleaser.yaml
路路路
        
        1
        +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

      
        
        2
        +# vim: set ts=2 sw=2 tw=0

      
        
        3
        +version: 2

      
        
        4
        +

      
        
        5
        +before:

      
        
        6
        +  hooks:

      
        
        7
        +    - go mod tidy

      
        
        8
        +

      
        
        9
        +builds:

      
        
        10
        +  - env:

      
        
        11
        +      - CGO_ENABLED=0

      
        
        12
        +    goos:

      
        
        13
        +      - linux

      
        
        14
        +      - darwin

      
        
        15
        +      - freebsd

      
        
        16
        +      - openbsd

      
        
        17
        +    goarch:

      
        
        18
        +      - amd64

      
        
        19
        +      - arm64

      
        
        20
        +    ldflags:

      
        
        21
        +      - -s -w

      
        
        22
        +      - -X 'main.Version={{.Version}}'

      
        
        23
        +    flags:

      
        
        24
        +      - -trimpath

      
        
        25
        +

      
        
        26
        +archives:

      
        
        27
        +  - formats: [tar.gz]

      
        
        28
        +    name_template: >-

      
        
        29
        +      {{ .ProjectName }}_

      
        
        30
        +      {{- title .Os }}_

      
        
        31
        +      {{- if eq .Arch "amd64" }}x86_64

      
        
        32
        +      {{- else if eq .Arch "386" }}i386

      
        
        33
        +      {{- else }}{{ .Arch }}{{ end }}

      
        
        34
        +      {{- if .Arm }}v{{ .Arm }}{{ end }}