Skip to content

Commit

Permalink
feat: init goreleaser files
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakiyo committed Aug 29, 2023
1 parent 536fa92 commit 2d6d62d
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
push:
# run only against tags
tags:
- '*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- run: git fetch --force --tags

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: './go.mod'

- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ go.work

# Builds
tldr*

dist/
50 changes: 50 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
project_name: "tilde"
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

scoops:
- folder: pkg/scoop
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "Update scoop manifest to {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/Yakiyo/scoob"
description: "Drop-in replacement cli for scoop"
depends: ["git"]
repository:
owner: "Yakiyo"
name: "scoob"
branch: "main"

0 comments on commit 2d6d62d

Please # to comment.