Skip to content

Commit

Permalink
Adding actions to build the cli on release
Browse files Browse the repository at this point in the history
- Updating cli version for new release
  • Loading branch information
agonzale34 committed May 12, 2022
1 parent 50d47fc commit abab158
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 10 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
release:
types: [created]

jobs:
releases-matrix:
name: Release boilr Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, darwin/amd64, darwin/arm64
goos: [linux, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1.28
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "1.18"
binary_name: "boilr"
extra_files: LICENSE README.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Boilr
<br>
<a href="http://travis-ci.org/tmrts/boilr"><img alt="Build Status" src="https://img.shields.io/travis/tmrts/boilr.svg?style=flat-square" /></a>
<a href="https://github.com/tmrts/boilr/blob/master/LICENSE" ><img alt="License" src="https://img.shields.io/badge/license-Apache%20License%202.0-E91E63.svg?style=flat-square"/></a>
<a href="https://github.com/tmrts/boilr/releases" ><img alt="Release Version" src="https://img.shields.io/badge/release-v0.3.0-blue.svg?style=flat-square"/></a>
<a href="https://github.com/tmrts/boilr/releases" ><img alt="Release Version" src="https://img.shields.io/badge/release-v0.3.1-blue.svg?style=flat-square"/></a>
<a href="http://goreportcard.com/report/tmrts/boilr" ><img alt="Code Quality" src="https://img.shields.io/badge/report%20card-A%2B-F44336.svg?style=flat-square"/></a>
<a href="https://godoc.org/github.com/tmrts/boilr" ><img alt="Documentation" src="https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square"/></a>
<a href="https://gitter.im/tmrts/boilr" ><img alt="Chat Room" src="https://img.shields.io/badge/chat-on%20gitter-00BCD4.svg?style=flat-square"/></a>
Expand Down
20 changes: 12 additions & 8 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -u

[[ "$@" =~ --pre ]] && version=0.3.0 pre=1 ||
version=0.3.0 pre=0
[[ "$@" =~ --pre ]] && version=0.3.1 pre=1 ||
version=0.3.1 pre=0

# If stdin is a tty, we are "interactive".
interactive=
Expand Down Expand Up @@ -90,7 +90,9 @@ download() {
return
fi

local url=https://github.com/tmrts/boilr/releases/download/$version/${1}.tgz
local url=https://github.com/Wattpad/boilr/releases/download/$version/${1}.tar.gz
echo "Downloading file from: " $url

if which curl > /dev/null; then
curl -fL $url | tar -xz
elif which wget > /dev/null; then
Expand All @@ -114,10 +116,12 @@ archi=$(uname -sm)
binary_available=1
binary_error=""
case "$archi" in
Darwin\ x86_64) download boilr-$version-darwin_${binary_arch:-amd64} ;;
Darwin\ i*86) download boilr-$version-darwin_${binary_arch:-386} ;;
Linux\ x86_64) download boilr-$version-linux_${binary_arch:-amd64} ;;
Linux\ i*86) download boilr-$version-linux_${binary_arch:-386} ;;
Darwin\ x86_64) download boilr-$version-darwin-${binary_arch:-amd64} ;;
Darwin\ arm64) download boilr-$version-darwin-${binary_arch:-arm64} ;;
Darwin\ i*86) download boilr-$version-darwin-${binary_arch:-386} ;;
Linux\ x86_64) download boilr-$version-linux-${binary_arch:-amd64} ;;
Linux\ arm64) download boilr-$version-linux-${binary_arch:-arm64} ;;
Linux\ i*86) download boilr-$version-linux-${binary_arch:-386} ;;
*) binary_available=0 binary_error=1 ;;
esac

Expand All @@ -126,5 +130,5 @@ Completed installation
Boilr executable is installed to ~/bin/boilr
For more information, see: https://github.com/tmrts/boilr
For more information, see: https://github.com/Wattpad/boilr
EOF
2 changes: 1 addition & 1 deletion pkg/boilr/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
AppName = "boilr"

// Version of the application
Version = "0.3.0"
Version = "0.3.1"

// ConfigDirPath is the configuration directory of the application
ConfigDirPath = ".config/boilr"
Expand Down

0 comments on commit abab158

Please sign in to comment.