Skip to content

Commit

Permalink
Let's try that goreleaser magic
Browse files Browse the repository at this point in the history
  • Loading branch information
isimluk committed Aug 25, 2020
1 parent ca7996f commit dfc6062
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69 changes: 69 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
#before:
# hooks:
# # You may remove this if you don't use go modules.
# - go mod download
# # you may remove this if you don't need go generate
# - go generate ./...

builds:
- env:
- CGO_ENABLED=0
main: ./cli/gocomply_xsd2go/main.go
binary: gocomply_xsd2go

goos:
- windows
- darwin
- linux
goarch:
- 386
- amd64
- arm
- arm64

archives:
- replacements:
darwin: macOS
linux: Linux
windows: Windows
386: i386
amd64: x86_64

format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

nfpms:
- id: gocomply_xsd2go

file_name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Release }}.{{ .Arch }}"
replacements:
386: i686
amd64: x86_64
arm: aarch32
arm64: aarch64

formats:
- deb
- rpm

bindir: /usr/bin

homepage: github.com/GoComply/xsd2go
license: The Unlicense
description: Automatically generate golang xml parser based on XSD
release: 1

0 comments on commit dfc6062

Please # to comment.