mirror of
https://github.com/Adembc/lazyssh.git
synced 2026-07-14 12:13:34 +02:00
ci: add GoReleaser + CI workflow for cross-platform releases (#5)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
version: 2.9.0
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
+3
-1
@@ -33,4 +33,6 @@ go.work.sum
|
||||
brainstorm
|
||||
.idea
|
||||
bin
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
# Added by goreleaser init:
|
||||
dist/
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
version: 2
|
||||
project_name: lazyssh
|
||||
|
||||
before:
|
||||
hooks:
|
||||
- go mod tidy
|
||||
|
||||
builds:
|
||||
- goos:
|
||||
- linux
|
||||
- windows
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
- 386
|
||||
main: ./cmd/main.go
|
||||
ldflags:
|
||||
-X main.version={{.Version}} -X main.gitCommit={{.Commit}} -X main.buildTime={{.Date}}
|
||||
|
||||
|
||||
|
||||
archives:
|
||||
- formats: [ tar.gz ]
|
||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||
name_template: >-
|
||||
{{ .ProjectName }}_
|
||||
{{- title .Os }}_
|
||||
{{- if eq .Arch "amd64" }}x86_64
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
{{- if .Arm }}v{{ .Arm }}{{ end }}
|
||||
# use zip for windows archives
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
formats: [ zip ]
|
||||
|
||||
checksum:
|
||||
name_template: "checksums.txt"
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- "^docs:"
|
||||
- "^test:"
|
||||
brews:
|
||||
- repository:
|
||||
owner: adembc
|
||||
name: homebrew-tap
|
||||
homepage: "https://github.com/adembc/lazyssh"
|
||||
description: "A simple terminal UI for managing SSH connections. "
|
||||
|
||||
release:
|
||||
footer: >-
|
||||
|
||||
---
|
||||
|
||||
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
|
||||
Reference in New Issue
Block a user