Skip to content

Commit

Permalink
Use GoReleaser to build cli-wallet (iotaledger#674)
Browse files Browse the repository at this point in the history
* build cli-wallet with goreleaser

* remove cli-wallet build script

* use plain goreleaser as cgo is not required
  • Loading branch information
Wollac authored Jul 27, 2020
1 parent 3fd4c9a commit fb3d15c
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 117 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ jobs:
name: GoReleaser
runs-on:
- ubuntu-latest
container:
image: 'iotmod/goreleaser-cgo-cross-compiler:1.14.4'
volumes:
- /repo
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Copy config.default.json to config.json
run: cp config.default.json config.json
- name: Release GoShimmer
run: goreleaser --rm-dist
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
docker:
Expand Down
197 changes: 98 additions & 99 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,98 @@
# Documentation at http://goreleaser.com

# Project name
project_name: GoShimmer

# Environment variables
env:
- GO111MODULE=on

# Builds
builds:
# macOS AMD64
- id: goshimmer-darwin-amd64
binary: goshimmer
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
main: main.go
goos:
- darwin
goarch:
- amd64
# Linux AMD64
- id: goshimmer-linux-amd64
binary: goshimmer
env:
- CGO_ENABLED=1
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
flags:
- -tags=pow_avx
main: main.go
goos:
- linux
goarch:
- amd64
# Windows AMD64
- id: goshimmer-windows-amd64
binary: goshimmer
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
flags:
- -tags=pow_avx
main: main.go
goos:
- windows
goarch:
- amd64

# Archives
archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}-{{.Version}}_{{.Os}}_{{.Arch}}"
replacements:
amd64: x86_64
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
- config.json
- snapshot.bin

# Checksum
checksum:
name_template: "checksums.txt"

# Snapshot
snapshot:
name_template: "{{ .Tag }}"

# Changelog
changelog:
skip: true

# Release
release:
prerelease: auto
name_template: "{{.ProjectName}}-{{.Version}}"
github:
owner: iotaledger
name: goshimmer
# Documentation at http://goreleaser.com

# Project name
project_name: GoShimmer

# Environment variables
env:
- GO111MODULE=on

# Builds
builds:
# GoShimmer AMD64 all OS
- id: goshimmer
binary: goshimmer
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/banner.AppVersion={{.Version}}
goos:
- linux
- darwin
- windows
goarch:
- amd64

# cli-wallet AMD64 all OS
- id: cli-wallet
dir: ./tools/cli-wallet
binary: cli-wallet
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64

# Archives
archives:
# GoShimmer with config and snapshot
- id: goshimmer
builds:
- goshimmer
name_template: "goshimmer-{{.Version}}_{{.Os}}_{{.Arch}}"
replacements:
amd64: x86_64
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
format_overrides:
- goos: windows
format: zip
files:
- README.md
- LICENSE
- config.json
- snapshot.bin

# cli-wallet
- id: cli-wallet
builds:
- cli-wallet
name_template: "cli-wallet-{{.Version}}_{{.Os}}_{{.Arch}}"
replacements:
amd64: x86_64
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
format_overrides:
- goos: windows
format: zip
files:
- LICENSE

# Checksum
checksum:
name_template: "checksums.txt"

# Snapshot
snapshot:
name_template: "{{ .Tag }}"

# Changelog
changelog:
skip: true

# Release
release:
prerelease: auto
name_template: "{{.ProjectName}}-{{.Version}}"
github:
owner: iotaledger
name: goshimmer
12 changes: 0 additions & 12 deletions tools/cli-wallet/build.sh

This file was deleted.

0 comments on commit fb3d15c

Please sign in to comment.