Skip to content

Commit

Permalink
Added release workflow, announcments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Sep 28, 2021
1 parent 08ed883 commit 1e60768
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# From: https://goreleaser.com/ci/actions/#usage
name: release

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2.1.4
with:
go-version: 1.17
- name: Setup Node
uses: actions/setup-node@v2.4.1
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.7.0
with:
distribution: goreleaser
version: latest
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
48 changes: 46 additions & 2 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 @@ -15,20 +15,64 @@ changelog:
- '^test:'

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

# ---------------------------
# Publishers
# ---------------------------
publishers:
- name: npm
cmd: make publish
dir: "."

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

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

# See more at: https://goreleaser.com/customization/announce/#slack
slack:
enabled: true
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Changelog: https://github.com/tonicpow/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
channel: '#releases'
# 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/tonicpow/{{ .ProjectName }}/releases/tag/{{ .Tag }}'
# Defaults to `{{ .ProjectName }} {{ .Tag }} is out!`
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'

0 comments on commit 1e60768

Please sign in to comment.