mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 00:53:23 +08:00
add windows to release assets
This commit is contained in:
parent
2e593d5659
commit
fd170f5cbb
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
|
||||
prerelease: true
|
||||
asset_name: netclient-darwin-arm64
|
||||
|
||||
netclient-windows:
|
||||
runs-on: windows-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