Skip to content

Commit

Permalink
Merge pull request #52 from seashell/feature/releases
Browse files Browse the repository at this point in the history
Add automated release support
  • Loading branch information
edufschmidt authored May 18, 2021
2 parents 206dc7f + edf28d2 commit 4a83551
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Drago

on:
push:
tags:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout branch
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ Godeps/
# End of https://www.gitignore.io/api/go
ui/node_modules/*
ui/.eslintcache
ui/build/**/
ui/build
vendor/*

!*.keep

tmp
dist/
36 changes: 36 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
before:
hooks:
- go mod tidy
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
goarch:
- amd64
- arm
- arm64
ldflags:
- -s -w -extldflags "-static"
- -s -d -X version.Version={{ .Version }}
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: '{{ .ProjectName }}_v{{ .Version }}_checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
release:
name_template: "{{ .ProjectName }}-v{{ .Version }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var (
GitDescribe string

// The main version number that is being run at the moment.
Version = "0.2.0"
Version = "dev"

// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
Expand Down

0 comments on commit 4a83551

Please sign in to comment.