-
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.
* fix: barry 2024-12-31 14:12:22 * fix: barry 2024-12-31 14:13:40 * fix: barry 2025-01-02 11:07:23 * refactor: Simplify git diff handling and add OpenAI client * docs: Add environment variables to README.md * ci: Add release workflow and GoReleaser config * feat: Add branch name to git push command * feat: Add tag command and update build configurations * fix: barry 2025-01-02 22:21:32 * fix: barry 2025-01-02 22:22:33 * fix: barry 2025-01-03 10:04:11 * chore: Update GoReleaser config and refactor tag utils
- Loading branch information
Showing
8 changed files
with
169 additions
and
6 deletions.
There are no files selected for viewing
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,21 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: [ "v*.*.*" ] | ||
|
||
jobs: | ||
release: | ||
name: Release on GitHub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
version: latest | ||
args: release --clean --timeout 60m | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
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,45 @@ | ||
builds: | ||
- main: ./main.go | ||
id: fastcommit | ||
binary: fastcommit | ||
skip: false | ||
env: | ||
- CGO_ENABLED=0 | ||
- GOPROXY=https://goproxy.io | ||
targets: | ||
- "darwin_amd64" | ||
- "windows_amd64" | ||
- "linux_amd64" | ||
- "linux_amd64" | ||
ldflags: | ||
- -X 'github.com/pubgo/funk/version.version={{ .Version }}' | ||
- -X 'github.com/pubgo/funk/version.project=fastcommit' | ||
- -X 'github.com/pubgo/funk/version.buildTime={{ .CommitDate }}' | ||
- -X 'github.com/pubgo/funk/version.commitID={{ .ShortCommit }}' | ||
flags: | ||
- -trimpath | ||
- -tags=releaser | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
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 | ||
report_sizes: true | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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
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,21 @@ | ||
package tagcmd | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/pubgo/fastcommit/utils" | ||
"github.com/pubgo/funk/recovery" | ||
"github.com/urfave/cli/v3" | ||
) | ||
|
||
func New() *cli.Command { | ||
return &cli.Command{ | ||
Name: "tag", | ||
Action: func(ctx context.Context, command *cli.Command) error { | ||
defer recovery.Exit() | ||
ver := utils.GetNextTag("alpha") | ||
utils.GitTag(ver.Original()) | ||
return nil | ||
}, | ||
} | ||
} |
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
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
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
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