Skip to content

Commit

Permalink
Merge pull request #190 from DefGuard/dev
Browse files Browse the repository at this point in the history
Merge dev into main
  • Loading branch information
wojcik91 authored Jan 24, 2024
2 parents f0823b7 + 2d1ce22 commit c84b23d
Show file tree
Hide file tree
Showing 187 changed files with 13,047 additions and 1,385 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ pnpm install
```bash
pnpm tauri dev
```

### Windows

Remove `default-run` line from `[package]` section in `Cargo.toml` to build the project.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "defguard-client",
"private": false,
"version": "0.1.1",
"version": "0.2.0",
"type": "module",
"scripts": {
"dev": "npm-run-all --parallel vite typesafe-i18n",
Expand Down Expand Up @@ -51,6 +51,7 @@
"@types/byte-size": "^8.1.2",
"byte-size": "^8.1.1",
"classnames": "^2.3.2",
"compare-versions": "^6.1.0",
"dayjs": "^1.11.10",
"detect-browser": "^5.3.0",
"fast-deep-equal": "^3.1.3",
Expand All @@ -63,6 +64,7 @@
"prop-types": "^15.8.1",
"radash": "^11.0.0",
"react": "^18.2.0",
"react-auth-code-input": "^3.2.1",
"react-click-away-listener": "^2.2.3",
"react-dom": "^18.2.0",
"react-hook-form": "^7.48.2",
Expand Down
19 changes: 19 additions & 0 deletions pnpm-lock.yaml

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.

Loading

0 comments on commit c84b23d

Please sign in to comment.