diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..67cbed3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +# .github/workflows/release.yml +name: goreleaser + +on: + pull_request: + push: + # run only against tags + tags: + - "*" + +permissions: + contents: write + # packages: write + # issues: 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: stable + # More assembly might be required: Docker logins, GPG, etc. + # It all depends on your needs. + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v1" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b31e4ce..0034da1 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,11 +1,32 @@ -# .goreleaser.yml builds: - - env: - - CGO_ENABLED=0 + - binary: okgit goos: - - linux - darwin - - windows + - linux goarch: - amd64 - binary: bin/okgit + - arm64 + env: + - CGO_ENABLED=0 + flags: + - -mod=vendor + +release: + prerelease: auto + +universal_binaries: + - replace: true + +brews: + - + name: okgit + homepage: "https://github.com/rajnandan1/okgit" + tap: + owner: rajnandan1 + name: homebrew-rajnandan + commit_author: + name: rajnandan1 + email: rajnandan1@gmail.com + +checksum: + name_template: 'checksums.txt' \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go index 000265c..00d6ded 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -17,7 +17,7 @@ var rootCmd = &cobra.Command{ // Uncomment the following line if your bare application // has an action associated with it: // Run: func(cmd *cobra.Command, args []string) { }, - Version: "1.0.13", + Version: "1.0.14", } // Execute adds all child commands to the root command and sets flags appropriately.