Skip to content

Commit

Permalink
Merge pull request #69 from ymtdzzz/chore/release_with_goreleaser
Browse files Browse the repository at this point in the history
Add GoReleaser settings (binary)
  • Loading branch information
ymtdzzz authored Jun 17, 2024
2 parents 08b7c13 + 4cb7a3b commit fe90374
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v1'
distribution: goreleaser
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
@@ -1,3 +1,5 @@
otel-tui
.DS_Store
coverage.*

dist/
36 changes: 36 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
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 }}
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Logs

## Getting Started

This project is currently in the early stages of development, so you can only run it using the `go run` command:
Download the binary from Github release page and execute it.

Or, you can run it using the `go run` command:

```sh
$ git clone https://github.com/ymtdzzz/otel-tui.git
Expand Down
File renamed without changes.

0 comments on commit fe90374

Please sign in to comment.