Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,17 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 'stable' # The Go version to download (if necessary) and use.
- name: Make Build
id: make_build
env:
VERSION: ${{ steps.get_version.outputs.TAG }}
- name: Install objcopy for cross-arch binaries
run: |
make all -s && ls build
- name: Release Upload Assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
sudo apt-get update
sudo apt-get install -y binutils binutils-aarch64-linux-gnu
GOVERSION=$(go version | awk '{print $3}')
echo "GOVERSION=${GOVERSION}" >> $GITHUB_ENV
- name: Build Binary
uses: goreleaser/goreleaser-action@v6
with:
draft: true
files: |
build/*.gz
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97 changes: 97 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
version: 2

project_name: wisp

builds:
- id: archives-unix
main: .
binary: wisp
- flags:
- -trimpath
ldflags:
- -w -s
- -X 'github.com/jumpserver/wisp/cmd.Version={{ .Tag }}'
- -X 'github.com/jumpserver/wisp/cmd.BuildTime={{ .Date }}'
- -X 'github.com/jumpserver/wisp/cmd.GitCommit={{ .ShortCommit }}'
- -X 'github.com/jumpserver/wisp/cmd.GoVersion={{ .Env.GOVERSION }}'
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
- freebsd
- openbsd
- netbsd
goarch:
- amd64
- arm64
- mips64le
- ppc64le
- s390x
- riscv64
- loong64

- id: linux-deb
main: .
binary: wisp
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w
- -X 'github.com/jumpserver/wisp/cmd.Version={{ .Tag }}'
- -X 'github.com/jumpserver/wisp/cmd.BuildTime={{ .Date }}'
- -X 'github.com/jumpserver/wisp/cmd.GitCommit={{ .ShortCommit }}'
- -X 'github.com/jumpserver/wisp/cmd.GoVersion={{ .Env.GOVERSION }}'

hooks:
post:
- cmd: >-
{{- if eq .Arch "arm64" -}}
aarch64-linux-gnu-objcopy --remove-section .go.buildinfo "{{ .Path }}"
{{- else -}}
objcopy --remove-section .go.buildinfo "{{ .Path }}"
{{- end -}}
output: true

archives:
- id: tarballs
ids:
- archives-unix
formats:
- tar.gz
name_template: >-
{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}
files:
- config_example.yml
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

nfpms:
- id: linux-packages
ids:
- linux-deb
package_name: wisp
formats:
- deb
file_name_template: >-
{{ .PackageName }}_linux_{{ .Arch }}
bindir: /usr/local/bin
maintainer: JumpServer Dev <support@jumpserver.org>
description: Wisp is the communication component between JumpServer terminal services and the Core API.
homepage: https://github.com/jumpserver/wisp

checksum:
name_template: checksums.txt

changelog:
disable: true