Skip to content

Commit

Permalink
Creating actions and goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
rjshrjndrn committed Jul 17, 2024
1 parent 8985827 commit c87b00d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# .github/workflows/release.yml
name: goreleaser

on:
pull_request:
push:
# run only against tags
tags:
- "*"

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
22 changes: 22 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .goreleaser.yml
project_name: hey
release:
github:
owner: rjshrjndrn
name: hey
builds:
- main: ./cmd/app
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.appVersion={{.Version}}
brews:
- name: hey
repository:
owner: rjshrjndrn
name: homebrew-tap
url_template: "https://github.com/rjshrjndrn/hey/releases/download/{{ .Tag }}/hey_{{ .Version }}_{{ .Os }}_{{ .Arch }}.tar.gz"
homepage: "https://github.com/rjshrjndrn/hey"
description: "A templating tool using helm flavoured sprig"
test: |
system "#{bin}/hey --version"

0 comments on commit c87b00d

Please sign in to comment.