Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Wies <[email protected]>
  • Loading branch information
neomantra committed Nov 14, 2024
1 parent af0f9e7 commit 90bf246
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '>=1.23'

- name: Build
run: go build -v ./...
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: goreleaser

on:
pull_request:
push:

permissions:
contents: 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@v5
with:
go-version: '>=1.23'

- name: Build with GoReleaser on main
uses: goreleaser/goreleaser-action@v6
if: github.ref == 'refs/heads/main'
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: '~ v2'
args: build --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

- name: Publish with GoReleaser on tags
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: '~ v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.task
.DS_Store
bin/
dist/

./hello.png
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OllamaTea CHANGELOG

## 0.0.1 (2024-11-09)
## 0.0.1 (2024-11-14)

* Initial release

0 comments on commit 90bf246

Please sign in to comment.