Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add binaries to the release #4

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"