Skip to content

Commit

Permalink
Added release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Oct 29, 2021
1 parent ea9aea4 commit 0944f13
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# From: https://goreleaser.com/ci/actions/#usage
name: release

env:
GO111MODULE: on

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.8.0
with:
distribution: goreleaser
version: latest
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Syndicate to GoDocs
run: make godocs
57 changes: 54 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Make sure to check the documentation at http://goreleaser.com
# ---------------------------
# GENERAL
# General
# ---------------------------
before:
hooks:
Expand All @@ -12,16 +12,67 @@ changelog:
filters:
exclude:
- '^.github:'
- '^.vscode:'
- '^test:'

# ---------------------------
# BUILDER
# Publishers
# ---------------------------
# publishers:
# - name: "Publish GoDocs"
# cmd: make godocs

# ---------------------------
# Builder
# ---------------------------
build:
skip: true

# ---------------------------
# Github Release
# ---------------------------
release:
prerelease: true
name_template: "Release v{{.Version}}"
name_template: "Release v{{.Version}}"

# ---------------------------
# Announce
# ---------------------------
announce:

# See more at: https://goreleaser.com/customization/announce/#slack
slack:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/BitcoinSchema/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
channel: '#test_slack'
# username: ''
# icon_emoji: ''
# icon_url: ''

# See more at: https://goreleaser.com/customization/announce/#twitter
twitter:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'

# See more at: https://goreleaser.com/customization/announce/#discord
discord:
enabled: false
message_template: '{{ .ProjectName }} {{ .Tag }} is out!'
# Defaults to `GoReleaser`
author: ''
# Defaults to `3888754` - the grey-ish from goreleaser
color: ''
# Defaults to `https://goreleaser.com/static/avatar.png`
icon_url: ''

# See more at: https://goreleaser.com/customization/announce/#reddit
reddit:
enabled: false
# Application ID for Reddit Application
application_id: ""
# Username for your Reddit account
username: ""
# Defaults to `{{ .GitURL }}/releases/tag/{{ .Tag }}`
# url_template: 'https://github.com/BitcoinSchema/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'

0 comments on commit 0944f13

Please sign in to comment.