Skip to content

Commit

Permalink
added new go releaser workflow. (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyStiles authored Jun 8, 2022
1 parent c83e8b7 commit a6c0624
Show file tree
Hide file tree
Showing 2 changed files with 72 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:
- v*.*.*

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.16
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_DEPLOY_SECRET }}
43 changes: 43 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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:
- skip: true

release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL or empty if its private hosted.
# Note: it can only be one: either github or gitlab or gitea
github:
owner: timothystiles
name: poly

# IDs of the archives to use.
# Defaults to all.
# ids:
# - foo
# - bar

# If set to true, will not auto-publish the release.
# Default is false.
draft: true

# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: auto

# You can change the name of the GitHub release.
# Default is `{{.Tag}}`
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"

# You can disable this pipe in order to not upload any artifacts to
# GitHub.
# Defaults to false.
# disable: true

0 comments on commit a6c0624

Please sign in to comment.