Skip to content

Commit

Permalink
Update release workflow and go-gemini-cli binary name
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiagoSousaSantana committed Apr 2, 2024
1 parent c709179 commit b550c7e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 25 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Release

on:
push:
tags:
- 'v*'
- "v*"

permissions:
contents: write

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Build
run: go build -o go-gemini-cli

- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: go-gemini-cli
path: go-gemini-cli
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME}}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ bin
.idea/
.vscode/
*.iml
go-gemini
go-gemini-cli
19 changes: 19 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
builds:
- binary: go-gemini-cli
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
flags:
- -mod=vendor

release:
prerelease: auto

universal_binaries:
- replace: true
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module go-gemini
module github.com/thiagosousasantana/go-gemini-cli

go 1.22.0

Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/*
Copyright © 2024 Thiago Santana
*/
package main

import "go-gemini/cmd"
import "github.com/thiagosousasantana/go-gemini-cli/cmd"

func main() {
cmd.Execute()
Expand Down

0 comments on commit b550c7e

Please sign in to comment.