Skip to content

Commit

Permalink
Merge pull request #4 from zostay/binary-releases
Browse files Browse the repository at this point in the history
chore: add binaries to the release
  • Loading branch information
zostay authored Jun 27, 2024
2 parents 6b74fcd + 2621745 commit c38eb6e
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,18 @@ jobs:
echo "Release Notes Will be..."
echo "========================"
cat release-notes.md
- name: Linux 64-bit Build
env:
GOOS: linux
GOARCH: amd64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
- name: Apple Silicon Build
env:
GOOS: darwin
GOARCH: arm64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
- name: Apple Intel Build
env:
GOOS: darwin
GOARCH: amd64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,30 @@ jobs:
cat release-notes.md
- name: Create Release
run: gh release create -t "v$RELEASE_VERSION" "v$RELEASE_VERSION" --draft --notes-file=release-notes.md
- name: Linux 64-bit Build
env:
GOOS: linux
GOARCH: amd64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
- name: Apple Silicon Build
env:
GOOS: darwin
GOARCH: arm64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
- name: Apple Intel Build
env:
GOOS: darwin
GOARCH: amd64
run: go build -o genifest-$RELEASE_VERSION-$GOOS-$GOARCH ./
- name: Create Release
run: gh release create -t "v$RELEASE_VERSION" "v$RELEASE_VERSION" --draft --notes-file=release-notes.md
- name: Upload Linux 64-bit Binary
run: gh release upload "v$RELEASE_VERSION" genifest-$RELEASE_VERSION-linux-amd64
- name: Upload Apple Silicon Binary
run: gh release upload "v$RELEASE_VERSION" genifest-$RELEASE_VERSION-darwin-arm64
- name: Upload Apple Intel Binary
run: gh release upload "v$RELEASE_VERSION" genifest-$RELEASE_VERSION-darwin-amd64
- name: Finalize Release
run: gh release edit "v$RELEASE_VERSION" --draft=false
- name: Finalize Release
run: gh release edit "v$RELEASE_VERSION" --draft=false
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ This is a tool for generating kubernetes manifests that I use to deploy my appli

I'm using it more and more, so I plan to expand the documentation here soon.

## Installation

To install the tool, run the following command:

```bash
curl -L https://raw.githubusercontent.com/zostay/genifest/master/tools/install.sh | sh
```

Or to install from source, you'll need go 1.22 installed:

```bash
go install github.com/zostay/genifest/cmd/genifest@latest
```

# LICENSE

Copyright © 2023 Qubling LLC
Expand Down
9 changes: 9 additions & 0 deletions tools/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

INSTALL_DIR=/usr/local/bin
CURRENT_VERSION=$(curl -s https://api.github.com/repos/zostay/genifest/releases/latest | grep tag_name | cut -d '"' -f 4)
OS_NAME=$(uname -s | tr '[:upper:]' '[:lower:]')
OS_ARCH=$(uname -m)
DOWNLOAD_URL="https://github.com/zostay/genifest/releases/download/$CURRENT_VERSION/genifest-$CURRENT_VERSION-$OS_NAME-$OS_ARCH"

curl -L "$DOWNLOAD_URL" -o "$INSTALL_DIR/genifest"

0 comments on commit c38eb6e

Please sign in to comment.