Skip to content

Commit

Permalink
Merge pull request #2 from rsteube/add-goreleaser
Browse files Browse the repository at this point in the history
added goreleaser
  • Loading branch information
rsteube authored Nov 24, 2023
2 parents 4806d40 + d7de937 commit d205074
Show file tree
Hide file tree
Showing 7 changed files with 222 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug
description: File a bug/issue
title: "<title>"
labels: [bug]
body:
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: checkboxes
attributes:
label: OS
description: Operating System where this occured.
options:
- label: Linux
- label: OSX
- label: Windows
- type: checkboxes
attributes:
label: Shell
description: Shell where this occured.
options:
- label: Bash
- label: Elvish
- label: Fish
- label: Nushell
- label: Oil
- label: Powershell
- label: Xonsh
- label: Zsh
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Request
description: Submit a request
title: "<title>"
labels: [enhancement]
body:
- type: textarea
attributes:
label: Request
description: Describe the feature or problem you’d like to solve.
validations:
required: false
- type: textarea
attributes:
label: Proposed solution
description: How will it benefit the project and its users.
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the request!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
51 changes: 51 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Go

on:
pull_request:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: shallow clone
uses: actions/checkout@v4
if: "!startsWith(github.ref, 'refs/tags/')"

- name: deep clone
uses: actions/checkout@v4
if: startsWith(github.ref, 'refs/tags/')
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -coverprofile=profile.cov ./...

- name: "Check formatting"
run: '[ "$(gofmt -d -s . | tee -a /dev/stderr)" = "" ]'

- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

- name: "staticcheck"
run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUR_KEY: ${{ secrets.AUR_KEY }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmd/carapace-spec-man/carapace-spec-man
dist
docs/book
go.work
go.work.sum
profile.cov
69 changes: 69 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
main: ./cmd/carapace-spec-man
binary: carapace-spec-man
tags:
- release
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
-
description: "generate spec from manpages"
homepage: "https://github.com/rsteube/carapace-spec"
license: "MIT"
tap:
owner: rsteube
name: homebrew-tap
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
scoop:
description: "generate spec from manpages"
homepage: "https://github.com/rsteube/carapace-spec"
license: "MIT"
bucket:
owner: rsteube
name: scoop-bucket
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"

aurs:
-
description: "generate spec from manpages"
homepage: "https://github.com/rsteube/carapace-spec"
license: "MIT"
maintainers:
- rsteube <[email protected]>
private_key: '{{ .Env.AUR_KEY }}'
git_url: 'ssh://[email protected]/carapace-spec-bin.git'

nfpms:
-
description: "generate spec from manpages"
homepage: "https://github.com/rsteube/carapace-spec"
license: "MIT"
maintainer: rsteube <[email protected]>
formats:
- apk
- deb
- rpm
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/rsteube/carapace-spec-man

go 1.21.2
go 1.21

require (
github.com/lmorg/murex v0.0.0-20231013090319-c15107051f5b
Expand Down

0 comments on commit d205074

Please sign in to comment.