-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,34 +32,27 @@ jobs: | |
hash=`git rev-list --tags --max-count=1` | ||
version=`git describe --tags $hash` | ||
flag="-s -w -X main.secret=${{ secrets.API_SECRET }} -X main.measurement=${{ secrets.MEASUREMENT }} -X main.version=$version" | ||
GOOS=windows GOARCH=amd64 go build -ldflags "$flag" -o kaf-cli.exe cmd/cli.go | ||
GOOS=windows GOARCH=386 go build -ldflags "$flag" -o kaf-cli_32.exe cmd/cli.go | ||
GOOS=linux GOARCH=amd64 go build -ldflags "$flag" -o kaf-cli-linux cmd/cli.go | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "$flag" -o kaf-cli-darwin cmd/cli.go | ||
GOOS=windows GOARCH=amd64 go build -ldflags "$flag" -o build/windows-amd64/kaf-cli.exe cmd/cli.go | ||
GOOS=windows GOARCH=386 go build -ldflags "$flag" -o build/windows-386/kaf-cli.exe cmd/cli.go | ||
GOOS=linux GOARCH=amd64 go build -ldflags "$flag" -o build/linux-amd64/kaf-cli cmd/cli.go | ||
GOOS=linux GOARCH=arm64 go build -ldflags "$flag" -o build/linux-arm64/kaf-cli cmd/cli.go | ||
GOOS=darwin GOARCH=amd64 go build -ldflags "$flag" -o build/darwin-amd64/kaf-cli cmd/cli.go | ||
GOOS=darwin GOARCH=arm64 go build -ldflags "$flag" -o build/darwin-arm64/kaf-cli cmd/cli.go | ||
- name: compression zip | ||
run: | | ||
zip -j kaf-cli-windows.zip windows/kindlegen.exe kaf-cli.exe kaf-cli_32.exe | ||
zip -j kaf-cli-darwin.zip darwin/kindlegen kaf-cli-darwin | ||
zip kaf-cli-linux.zip kaf-cli-linux | ||
- name: Upload windows to release | ||
uses: JasonEtco/upload-to-release@master | ||
with: | ||
args: kaf-cli-windows.zip application/octet-stream | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload linux to release | ||
uses: JasonEtco/upload-to-release@master | ||
with: | ||
args: kaf-cli-linux.zip application/octet-stream | ||
hash=`git rev-list --tags --max-count=1` | ||
version=`git describe --tags $hash` | ||
zip -j kaf-cli_${version}_windows_amd64.zip build/windows-amd64/kaf-cli.exe windows/kindlegen.exe | ||
zip -j kaf-cli_${version}_windows_386.zip build/windows-386/kaf-cli.exe windows/kindlegen.exe | ||
zip -j kaf-cli_${version}_darwin_amd64.zip build/darwin-amd64/kaf-cli darwin/kindlegen | ||
zip -j kaf-cli_${version}_darwin_arm64.zip build/darwin-arm64/kaf-cli darwin/kindlegen | ||
zip -j kaf-cli_${version}_linux_amd64.zip build/linux-amd64/kaf-cli | ||
zip -j kaf-cli_${version}_linux_arm64.zip build/linux-arm64/kaf-cli | ||
- name: Upload release binaries | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload mac to release | ||
uses: JasonEtco/upload-to-release@master | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
args: kaf-cli-darwin.zip application/octet-stream | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
asset_paths: '["./kaf-cli_*.zip"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters