mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 09:02:57 +08:00
Merge pull request #997 from gravitl/workflows
Workflows: Add windows.exe to release assets
This commit is contained in:
commit
76736d33c5
1 changed files with 31 additions and 0 deletions
31
.github/workflows/buildandrelease.yml
vendored
31
.github/workflows/buildandrelease.yml
vendored
|
@ -394,3 +394,34 @@ jobs:
|
||||||
overwrite: true
|
overwrite: true
|
||||||
prerelease: true
|
prerelease: true
|
||||||
asset_name: netclient-darwin-arm64
|
asset_name: netclient-darwin-arm64
|
||||||
|
|
||||||
|
netclient-windows:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: version
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Set Variables
|
||||||
|
run: |
|
||||||
|
TAG=${{needs.version.outputs.tag}}
|
||||||
|
VERSION=${{needs.version.outputs.version}}
|
||||||
|
echo "NETMAKER_VERSION=${TAG}" >> $GITHUB_ENV
|
||||||
|
echo "PACKAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||||
|
- name: Setup go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.17
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd netclient
|
||||||
|
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-X 'main.version=${NETMAKER_VERSION}'" -o build/netclient.exe main.go
|
||||||
|
- name: Upload netclient windows to Release
|
||||||
|
continue-on-error: true
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: netclient/build/netclient.exe
|
||||||
|
tag: ${{ env.NETMAKER_VERSION }}
|
||||||
|
overwrite: true
|
||||||
|
prerelease: true
|
||||||
|
asset_name: netclient.exe
|
||||||
|
|
Loading…
Reference in a new issue