diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 73279654..b04338aa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -78,8 +78,8 @@ jobs: run: | VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1) echo Version: $VERSION - echo "VERSION=$VERSION" >> $GITHUB_ENV - - uses: actions/setup-node@v3 + echo "VERSION=$VERSION" >> ${GITHUB_ENV} + - uses: actions/setup-node@v4 with: node-version: "22" - uses: pnpm/action-setup@v4 @@ -89,7 +89,7 @@ jobs: - name: Get pnpm store directory shell: bash run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV} - uses: actions/cache@v4 name: Setup pnpm cache with: @@ -108,16 +108,15 @@ jobs: uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create RPM - run: | - rpmbuild --build-in-place --define "_topdir $(pwd)" --define "version ${{ env.VERSION }}" -bb resources-linux/defguard-client.spec + with: + args: "--bundles deb,rpm" - name: Upload RPM uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: RPMS/${{ matrix.binary_arch }}/defguard-client-${{ env.VERSION }}-1.${{ matrix.binary_arch }}.rpm + asset_path: src-tauri/target/release/bundle/rpm/defguard-client-${{ env.VERSION }}-1.${{ matrix.binary_arch }}.rpm asset_name: defguard-client-${{ env.VERSION }}-1.${{ matrix.binary_arch }}.rpm asset_content_type: application/octet-stream - name: Upload DEB @@ -237,8 +236,8 @@ jobs: run: | VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1) echo Version: $VERSION - echo "VERSION=$VERSION" >> $GITHUB_ENV - - uses: actions/setup-node@v3 + echo "VERSION=$VERSION" >> ${GITHUB_ENV} + - uses: actions/setup-node@v4 with: node-version: "22" - uses: pnpm/action-setup@v4 @@ -247,7 +246,7 @@ jobs: run_install: false - name: Get pnpm store directory shell: bash - run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + run: echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV} - uses: actions/cache@v4 name: Setup pnpm cache with: @@ -320,7 +319,7 @@ jobs: $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 + - uses: actions/setup-node@v4 with: node-version: "22" - uses: pnpm/action-setup@v4 @@ -329,7 +328,7 @@ jobs: run_install: false - name: Get pnpm store directory shell: bash - run: echo "STORE_PATH=$(pnpm store path --silent)" >> $env:GITHUB_ENV + run: echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV} - uses: actions/cache@v4 name: Setup pnpm cache with: @@ -376,7 +375,7 @@ jobs: run: | VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1) echo Version: $VERSION - echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> ${GITHUB_ENV} - name: Download unsigned bundle & burn-engine uses: actions/download-artifact@v4 with: @@ -422,7 +421,7 @@ jobs: run: | VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1) echo Version: $VERSION - echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" >> ${GITHUB_ENV} - name: Download unsigned bundle & signed burn-engine uses: actions/download-artifact@v4 with: diff --git a/src-tauri/resources-windows/binaries/.gitkeep b/src-tauri/resources-windows/binaries/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src-tauri/resources-windows/main.wxs b/src-tauri/resources-windows/main.wxs deleted file mode 100644 index 768e57ce..00000000 --- a/src-tauri/resources-windows/main.wxs +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - {{#if allow_downgrades}} - - {{else}} - - {{/if}} - - - Installed AND NOT UPGRADINGPRODUCTCODE - - - - - {{#if banner_path}} - - {{/if}} - {{#if dialog_image_path}} - - {{/if}} - {{#if license}} - - {{/if}} - - - - - - - - - - - - - - - - NOT REMOVE - - - - - - - - - - - WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed - - - - {{#unless license}} - - 1 - 1 - {{/unless}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{#each binaries as |bin| ~}} - - - - {{/each~}} - {{#if enable_elevated_update_task}} - - - - - - - - - - {{/if}} - {{resources}} - - - - - - - - - - - - - - - - - - - - - {{#each merge_modules as |msm| ~}} - - - - - - - - {{/each~}} - - - - - - {{#each resource_file_ids as |resource_file_id| ~}} - - {{/each~}} - - {{#if enable_elevated_update_task}} - - - - {{/if}} - - - - - - - - - - - {{#each binaries as |bin| ~}} - - {{/each~}} - - - - - {{#each component_group_refs as |id| ~}} - - {{/each~}} - {{#each component_refs as |id| ~}} - - {{/each~}} - {{#each feature_group_refs as |id| ~}} - - {{/each~}} - {{#each feature_refs as |id| ~}} - - {{/each~}} - {{#each merge_refs as |id| ~}} - - {{/each~}} - - - {{#if install_webview}} - - - - - - - {{#if download_bootstrapper}} - - - - - - - {{/if}} - - - {{#if webview2_bootstrapper_path}} - - - - - - - - {{/if}} - - - {{#if webview2_installer_path}} - - - - - - - - {{/if}} - - {{/if}} - - {{#if enable_elevated_update_task}} - - - - - NOT(REMOVE) - - - - - - - (REMOVE = "ALL") AND NOT UPGRADINGPRODUCTCODE - - - {{/if}} - - - - diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e4d71338..89d9a114 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -27,7 +27,6 @@ "digestAlgorithm": "sha256", "timestampUrl": "", "wix": { - "template": "./resources-windows/main.wxs", "fragmentPaths": [ "./resources-windows/service-fragment.wxs" ], @@ -58,6 +57,15 @@ "../control/prerm": "../resources-linux/prerm", "../control/postrm": "../resources-linux/postrm" } + }, + "rpm": { + "files": { + "/usr/sbin/defguard-service": "target/release/defguard-service", + "/lib/systemd/system/defguard-service.service": "../resources-linux/defguard-service.service" + }, + "postInstallScript": "../resources-linux/postinst", + "preRemoveScript": "../resources-linux/prerm", + "postRemoveScript": "../resources-linux/postrm" } } },