Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekgogia committed Mar 2, 2022
2 parents 6e999ed + b041869 commit c526f10
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags: ['v*']
workflow_dispatch: {}
jobs:
release:
release-operator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,4 +43,40 @@ jobs:
with:
charts_dir: operator/charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
release-cli:
strategy:
matrix:
os: ["darwin"]
arch: ["amd64"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "GOOS=darwin" >> $GITHUB_ENV
echo "GOARCH=amd64" >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: '1.17.1'
- name: Build the KIT CLI
run: |
go build -o ./bin/kitcli ./cmd/
zip ./bin/kitcli_${{ env.RELEASE_VERSION }}_${{ matrix.os }}_${{ matrix.arch }}.zip -j ./bin/kitcli
working-directory: substrate
- name: Attach the binary to release
uses: softprops/action-gh-release@v1
with:
files: "./substrate/bin/kitcli_${{ env.RELEASE_VERSION }}_${{ matrix.os }}_${{ matrix.arch }}.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions kitcli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Uupdate the version and SHA256 for the CLI
require 'formula'
class Kitcli < Formula
homepage 'https://github.com/awslabs/kubernetes-iteration-toolkit/substrate'
version 'v0.0.9'
if Hardware::CPU.is_64_bit?
url 'https://github.com/prateekgogia/kubernetes-iteration-toolkit/releases/download/v0.0.9/kitcli_v0.0.9_darwin_amd64.zip'
sha256 '228e9423813950beb149b8890f8bb9911424a1dd49664686948b340b50dc3a22'
else
echo "Hardware not supported"
exit 1
end
def install
bin.install 'kitcli'
end
end

0 comments on commit c526f10

Please sign in to comment.