Skip to content

Commit

Permalink
automated release
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj Nandan Sharma authored and Raj Nandan Sharma committed May 29, 2024
1 parent 9d13c6c commit ea5021f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 7 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
33 changes: 27 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -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: [email protected]

checksum:
name_template: 'checksums.txt'
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ea5021f

Please sign in to comment.