Skip to content

feat(install): add install instructions #110

feat(install): add install instructions

feat(install): add install instructions #110

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: go
extra-files: |
cmd/nomad/nomad.go
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Test and Build
env:
TOKEN: ${{ secrets.GH_API_TOKEN }}
MAIN_PATH: "./cmd/nomad"
run: |
echo -n "$TOKEN" > "$MAIN_PATH"/ghkey.txt
go generate "$MAIN_PATH"
go test ./...
GOOS=windows GOARCH=amd64 go build -o build-win64/ "$MAIN_PATH"
- name: Package
if: ${{ steps.release.outputs.release_created }}
run: cd build-win64 && zip ../win64.zip *
- name: Upload release binary with version info
uses: Bertrand256/upload-release-asset@v1.0.4
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ steps.release.outputs.tag_name }}
asset_path: win64.zip
asset_name: nomad-${{ steps.release.outputs.major }}.${{steps.release.outputs.minor}}.${{steps.release.outputs.patch}}-win64.zip
- name: Upload release binary without version info
uses: Bertrand256/upload-release-asset@v1.0.4
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ steps.release.outputs.tag_name }}
asset_path: win64.zip
asset_name: nomad-latest-win64.zip