Skip to content

Commit

Permalink
actions: redistribute wintun.dll
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Pashmfouroush <[email protected]>
  • Loading branch information
markpash committed May 28, 2024
1 parent 1aaa463 commit 76a3206
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/go-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,28 @@ jobs:
go-version: '1.22'
check-latest: true

- name: Cache wintun
id: cache
uses: actions/cache@v3
if: matrix.goos == 'windows'
env:
cache-name: cache-wintun
with:
path: ~/wintun-0.14.1.zip
key: wintun-0.14.1.zip

- name: Download wintun
if: matrix.goos == 'windows' && steps.cache.outputs.cache-hit != 'true'
run: |
curl -LO https://www.wintun.net/builds/wintun-0.14.1.zip --output-dir ~/
ls -lah ~/
- name: Validate wintun
if: matrix.goos == 'windows'
run: |
echo "07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51 ~/wintun-0.14.1.zip" | sha256sum --check --status
unzip ~/wintun-0.14.1.zip -d ~/wintun
- name: Build warp-plus
run: |
go build -v -o warp-plus_${{ env.ASSET_NAME }}/ -trimpath -ldflags "-s -w -buildid= -X main.version=${{ github.ref }}" ./cmd/warp-plus
Expand All @@ -80,6 +102,17 @@ jobs:
cp ${GITHUB_WORKSPACE}/README.md ./warp-plus_${{ env.ASSET_NAME }}/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./warp-plus_${{ env.ASSET_NAME }}/LICENSE
- name: Redistribute wintun.dll
if: matrix.goos == 'windows'
run: |
if [ "$GOARCH" = "amd64" ]; then
mv ~/wintun/wintun/bin/amd64/wintun.dll ./warp-plus_${{ env.ASSET_NAME }}/
elif [ "$GOARCH" = "arm64" ]; then
mv ~/wintun/wintun/bin/arm64/wintun.dll ./warp-plus_${{ env.ASSET_NAME }}/
elif [ "$GOARCH" = "386" ]; then
mv ~/wintun/wintun/bin/x86/wintun.dll ./warp-plus_${{ env.ASSET_NAME }}/
fi
- name: Create ZIP archive
shell: bash
run: |
Expand Down

0 comments on commit 76a3206

Please sign in to comment.