mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-25 00:51:28 +02:00
Use shared actions
This commit is contained in:
18
.github/workflows/golang-test-windows.yml
vendored
18
.github/workflows/golang-test-windows.yml
vendored
@@ -47,19 +47,11 @@ jobs:
|
||||
|
||||
- name: Download wintun
|
||||
id: download-wintun
|
||||
shell: pwsh
|
||||
run: |
|
||||
$url = "https://pkgs.netbird.io/wintun/wintun-0.14.1.zip"
|
||||
$dest = "${env:downloadPath}\wintun.zip"
|
||||
$expected = "07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dest) | Out-Null
|
||||
Invoke-WebRequest $url -OutFile $dest
|
||||
$actual = (Get-FileHash $dest -Algorithm SHA256).Hash.ToLower()
|
||||
if ($actual -ne $expected) {
|
||||
throw "wintun.zip checksum mismatch: expected $expected, got $actual"
|
||||
}
|
||||
"file-path=$dest" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
|
||||
uses: netbirdio/shared-actions/actions/win-download-and-verify@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
with:
|
||||
url: https://pkgs.netbird.io/wintun/wintun-0.14.1.zip
|
||||
destination: ${{ env.downloadPath }}\wintun.zip
|
||||
sha256: 07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51
|
||||
|
||||
- name: Decompressing wintun files
|
||||
run: tar -xvf "${{ steps.download-wintun.outputs.file-path }}" -C ${{ env.downloadPath }}
|
||||
|
||||
70
.github/workflows/release.yml
vendored
70
.github/workflows/release.yml
vendored
@@ -141,7 +141,7 @@ jobs:
|
||||
|
||||
- name: Parse semver string
|
||||
id: semver_parser
|
||||
uses: ./.github/actions/parse-semver
|
||||
uses: netbirdio/shared-actions/actions/parse-semver@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
|
||||
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: echo "flags=--snapshot" >> $GITHUB_ENV
|
||||
@@ -330,7 +330,7 @@ jobs:
|
||||
|
||||
- name: Parse semver string
|
||||
id: semver_parser
|
||||
uses: ./.github/actions/parse-semver
|
||||
uses: netbirdio/shared-actions/actions/parse-semver@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
|
||||
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: echo "flags=--snapshot" >> $GITHUB_ENV
|
||||
@@ -489,7 +489,7 @@ jobs:
|
||||
|
||||
- name: Parse semver string
|
||||
id: semver_parser
|
||||
uses: ./.github/actions/parse-semver
|
||||
uses: netbirdio/shared-actions/actions/parse-semver@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
|
||||
- name: Add 7-Zip to PATH
|
||||
run: echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
@@ -522,17 +522,11 @@ jobs:
|
||||
|
||||
- name: Download wintun
|
||||
id: download-wintun
|
||||
shell: pwsh
|
||||
run: |
|
||||
$url = "https://pkgs.netbird.io/wintun/wintun-0.14.1.zip"
|
||||
$dest = "${env:downloadPath}\wintun.zip"
|
||||
$expected = "07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51"
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dest) | Out-Null
|
||||
Invoke-WebRequest $url -OutFile $dest
|
||||
$actual = (Get-FileHash $dest -Algorithm SHA256).Hash.ToLower()
|
||||
if ($actual -ne $expected) {
|
||||
throw "wintun.zip checksum mismatch: expected $expected, got $actual"
|
||||
}
|
||||
uses: netbirdio/shared-actions/actions/win-download-and-verify@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
with:
|
||||
url: https://pkgs.netbird.io/wintun/wintun-0.14.1.zip
|
||||
destination: ${{ env.downloadPath }}\wintun.zip
|
||||
sha256: 07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51
|
||||
|
||||
- name: Decompress wintun files
|
||||
run: tar -xvf "${{ env.downloadPath }}\wintun.zip" -C ${{ env.downloadPath }}
|
||||
@@ -543,17 +537,11 @@ jobs:
|
||||
- name: Download Mesa3D (amd64 only)
|
||||
id: download-mesa3d
|
||||
if: matrix.arch == 'amd64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$url = "https://pkgs.netbird.io/mesa3d/MesaForWindows-x64-20.1.8.7z"
|
||||
$dest = "${env:downloadPath}\mesa3d.7z"
|
||||
$expected = "71c7cb64ec229a1d6b8d62fa08e1889ed2bd17c0eeede8689daf0f25cb31d6b9"
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dest) | Out-Null
|
||||
Invoke-WebRequest $url -OutFile $dest
|
||||
$actual = (Get-FileHash $dest -Algorithm SHA256).Hash.ToLower()
|
||||
if ($actual -ne $expected) {
|
||||
throw "mesa3d.7z checksum mismatch: expected $expected, got $actual"
|
||||
}
|
||||
uses: netbirdio/shared-actions/actions/win-download-and-verify@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
with:
|
||||
url: https://pkgs.netbird.io/mesa3d/MesaForWindows-x64-20.1.8.7z
|
||||
destination: ${{ env.downloadPath }}\mesa3d.7z
|
||||
sha256: 71c7cb64ec229a1d6b8d62fa08e1889ed2bd17c0eeede8689daf0f25cb31d6b9
|
||||
|
||||
- name: Extract Mesa3D driver (amd64 only)
|
||||
if: matrix.arch == 'amd64'
|
||||
@@ -564,34 +552,22 @@ jobs:
|
||||
run: mv ${{ env.downloadPath }}\opengl32.dll ${{ github.workspace }}\dist\${{ env.PackageWorkdir }}\
|
||||
|
||||
- name: Download EnVar plugin for NSIS
|
||||
shell: pwsh
|
||||
run: |
|
||||
$url = "https://pkgs.netbird.io/nsis/EnVar_plugin.zip"
|
||||
$dest = "${{ github.workspace }}\envar_plugin.zip"
|
||||
$expected = "e9aa92de351345ed82795251d838f1ae9041ba35af9d381a5780c7843b01f56a"
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dest) | Out-Null
|
||||
Invoke-WebRequest $url -OutFile $dest
|
||||
$actual = (Get-FileHash $dest -Algorithm SHA256).Hash.ToLower()
|
||||
if ($actual -ne $expected) {
|
||||
throw "envar_plugin.zip checksum mismatch: expected $expected, got $actual"
|
||||
}
|
||||
uses: netbirdio/shared-actions/actions/win-download-and-verify@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
with:
|
||||
url: https://pkgs.netbird.io/nsis/EnVar_plugin.zip
|
||||
destination: ${{ github.workspace }}\envar_plugin.zip
|
||||
sha256: e9aa92de351345ed82795251d838f1ae9041ba35af9d381a5780c7843b01f56a
|
||||
|
||||
- name: Extract EnVar plugin
|
||||
run: 7z x -o"${{ github.workspace }}/NSIS_Plugins" "${{ github.workspace }}/envar_plugin.zip"
|
||||
|
||||
- name: Download ShellExecAsUser plugin for NSIS (amd64 only)
|
||||
if: matrix.arch == 'amd64'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$url = "https://pkgs.netbird.io/nsis/ShellExecAsUser_amd64-Unicode.7z"
|
||||
$dest = "${{ github.workspace }}\ShellExecAsUser_amd64-Unicode.7z"
|
||||
$expected = "0a55ea25c7330a92cec028eda8afcaf1b1a7092e0dfb77c21c8f654564b4ff9d"
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dest) | Out-Null
|
||||
Invoke-WebRequest $url -OutFile $dest
|
||||
$actual = (Get-FileHash $dest -Algorithm SHA256).Hash.ToLower()
|
||||
if ($actual -ne $expected) {
|
||||
throw "ShellExecAsUser_amd64-Unicode.7z checksum mismatch: expected $expected, got $actual"
|
||||
}
|
||||
uses: netbirdio/shared-actions/actions/win-download-and-verify@be5df6047383da2236e02243cceb857d8567c27e # v0.0.2
|
||||
with:
|
||||
url: https://pkgs.netbird.io/nsis/ShellExecAsUser_amd64-Unicode.7z
|
||||
destination: ${{ github.workspace }}\ShellExecAsUser_amd64-Unicode.7z
|
||||
sha256: 0a55ea25c7330a92cec028eda8afcaf1b1a7092e0dfb77c21c8f654564b4ff9d
|
||||
|
||||
- name: Extract ShellExecAsUser plugin (amd64 only)
|
||||
if: matrix.arch == 'amd64'
|
||||
|
||||
Reference in New Issue
Block a user