-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
Merge dev into main
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -273,3 +273,77 @@ jobs: | |
asset_path: src-tauri/target/${{ matrix.target }}/product-signed/defguard.pkg | ||
asset_name: defguard-${{ matrix.target }}-${{ env.VERSION }}.pkg | ||
asset_content_type: application/octet-stream | ||
|
||
build-windows: | ||
needs: | ||
- create-release | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Write release version | ||
run: | | ||
$env:VERSION=echo ($env:GITHUB_REF_NAME.Substring(1) -Split "-")[0] | ||
echo Version: $env:VERSION | ||
echo "VERSION=$env:VERSION" >> $env:GITHUB_ENV | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
|
||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $env:GITHUB_ENV | ||
|
||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-build-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-build-store- | ||
- name: Install deps | ||
run: pnpm install --frozen-lockfile | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Remove "default-run" line from Cargo.toml | ||
run: | | ||
Set-Content -Path ".\src-tauri\Cargo.toml" -Value (get-content -Path ".\src-tauri\Cargo.toml" | Select-String -Pattern 'default-run =' -NotMatch) | ||
- name: Build packages | ||
uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Bundle application | ||
run: | | ||
dotnet tool install --global wix | ||
wix --version | ||
wix extension add -g WixToolset.Bal.wixext | ||
wix build .\src-tauri\resources-windows\defguard-client.wxs -ext WixToolset.Bal.wixext | ||
- name: Upload installer | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: src-tauri/resources-windows/defguard-client.exe | ||
asset_name: defguard-client_${{ env.VERSION }}_x64_en-US.exe | ||
asset_content_type: application/octet-stream | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.