Skip to content

Commit

Permalink
Merge pull request #102 from tri-adam/goreleaser
Browse files Browse the repository at this point in the history
Release with GoReleaser
  • Loading branch information
tri-adam authored Jul 30, 2021
2 parents 4be1da3 + f271843 commit 7cb03fa
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,40 @@ jobs:
- codecov/upload:
file: cover.out

release-test:
executor: golang
steps:
- checkout
- run:
name: Test Release
command: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish

publish-release:
executor: golang
steps:
- checkout
- run:
name: Publish Release
command: curl -sL https://git.io/goreleaser | bash

workflows:
version: 2

build_and_test:
build-and-test:
jobs:
- lint-markdown
- lint-source
- check-go-mod
- build-source
- unit-test
- release-test

tagged-release:
jobs:
- publish-release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
context: github-release
44 changes: 44 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
project_name: siftool

release:
github:
owner: sylabs
name: sif

builds:
- binary: siftool
goos:
- darwin
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 6
- 7
env:
- CGO_ENABLED=0
ldflags: '-s -w -X main.version={{ .Version }} -X main.commit={{ .FullCommit }} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser'
main: ./cmd/siftool
mod_timestamp: '{{ .CommitTimestamp }}'

archives:
- format: tar.gz
wrap_in_directory: true
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
files:
- README.md

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '^dev:'
- '^docs:'
- '^test:'
- '^Merge branch'
- '^Merge pull request'

0 comments on commit 7cb03fa

Please sign in to comment.