-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
122 additions
and
140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: '🧑🏭' | ||
on: [ push ] | ||
permissions: | ||
contents: write | ||
jobs: | ||
|
||
check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
check-latest: true | ||
cache: true | ||
- run: go vet ./... | ||
- run: go test -v ./... | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/v') == true | ||
needs: check | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'go.mod' | ||
check-latest: true | ||
cache: true | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
* | ||
!*/ | ||
|
||
!/.github/**/*.yaml | ||
|
||
!/.gitattributes | ||
!/.gitignore | ||
|
||
!/Makefile | ||
!/deb.sh | ||
|
||
!/go.mod | ||
!/go.sum | ||
!/*.go | ||
|
||
!/LICENSE.txt | ||
!/README.md | ||
/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# This is a goreleaser config file. Check the docs at https://goreleaser.com | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 1 | ||
|
||
project_name: gobonsai | ||
|
||
builds: | ||
- binary: '{{ .ProjectName }}' | ||
env: | ||
- CGO_ENABLED=0 | ||
tags: | ||
- osusergo | ||
- netgo | ||
ldflags: | ||
- '-s' | ||
- '-w' | ||
- '-X github.com/nothub/gobonsai/buildinfo.Version={{ .Version }}' | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
ignore: | ||
- goos: linux | ||
goarch: 386 | ||
- goos: windows | ||
goarch: 386 | ||
- goos: windows | ||
goarch: arm64 | ||
#no_unique_dist_dir: true | ||
|
||
upx: | ||
- enabled: true | ||
goos: [ linux, windows ] | ||
compress: best | ||
lzma: true | ||
|
||
archives: | ||
- meta: false | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE.txt | ||
|
||
nfpms: | ||
- file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}' | ||
maintainer: Florian Hübner <[email protected]> | ||
description: |- | ||
A bonsai tree generator | ||
homepage: https://github.com/nothub/gobonsai | ||
license: MIT | ||
section: games | ||
dependencies: | ||
- libc6 (>= 2.24) | ||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
- archlinux | ||
bindir: /usr/local/bin | ||
meta: false | ||
|
||
changelog: | ||
sort: asc | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
algorithm: sha256 | ||
|
||
release: | ||
github: | ||
owner: nothub | ||
name: gobonsai | ||
name_template: 'v{{ .Version }}' | ||
header: 'Release generated at commit: {{ .ShortCommit }}' | ||
draft: true | ||
replace_existing_draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
package main | ||
|
||
// This variable will be populated at build-time. | ||
// TODO: version variable not injected at build | ||
var version = "" | ||
// The Version variable will be populated at build-time. | ||
var Version = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module hub.lol/gobonsai | ||
module github.com/nothub/gobonsai | ||
|
||
go 1.20 | ||
|
||
|