Skip to content

fix: remove redundant arguments in Windows platform configuration #49

fix: remove redundant arguments in Windows platform configuration

fix: remove redundant arguments in Windows platform configuration #49

Workflow file for this run

name: "Publish"
on:
push:
branches:
- master
- release/**
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
jobs:
check-version:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
outputs:
version: ${{ steps.check-version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
install-deps: false
- name: Check Version
id: check-version
uses: shm11C3/tauri-check-release-version@v1.0.4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: shm11C3
repo: HardwareVisualizer
tauri_config_path: ./src-tauri/tauri.conf.json
tag_name_format: v{VERSION}
publish-tauri:
needs: check-version
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "windows-latest"
args: "--debug"
os-name: "windows"
- platform: "ubuntu-22.04"
args: ""
os-name: "linux"
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Linux dependencies
if: matrix.platform == 'ubuntu-22.04'
uses: ./.github/actions/setup-linux-deps
with:
extra-packages: "libfuse2 libappindicator3-dev patchelf"
- name: Fix linuxdeploy permissions
if: matrix.platform == 'ubuntu-22.04'
run: chmod +x ./src-tauri/target/release/bundle/appimage/linuxdeploy-*.AppImage || true
- name: Unset problematic env vars
if: matrix.platform == 'ubuntu-22.04'
run: |
unset GTK_PATH
unset LD_LIBRARY_PATH
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
setup-safe-chain: false
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
components: ""
- name: Generate licenses.json
run: npx license-checker --production --json > licenses.json
- name: Check licenses
run: node --experimental-strip-types .github/scripts/check-licenses.ts licenses.json
- name: Update tauri.conf.json using Node.js script
run: node .github/scripts/updateTauriConfig.cjs "trusted-signing-cli -e https://eus.codesigning.azure.net/ -a hardware-monitor -c hv-certificate %1"
- name: Setup Azure Code Signing
run: cargo install trusted-signing-cli
# Generate THIRD_PARTY_LICENSES file
# Generate here to include in Tauri build bundle
- name: Install cargo-license
run: cargo install cargo-license
- name: Generate THIRD_PARTY_NOTICES
run: node --experimental-strip-types .github/scripts/generate-licenses.ts tmp
- uses: tauri-apps/tauri-action@19b93bb55601e3e373a93cfb6eb4242e45f5af20 # v0.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
- if: ${{ matrix.platform == 'windows-latest' }}
name: Bundle Offline Installer
env:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: npm run tauri bundle -- --config src-tauri/tauri.microsoftstore.conf.json
shell: bash
- if: ${{ matrix.platform == 'windows-latest' }}
name: Rename Offline Installer
run: |
mkdir -p dist/offline
cp src-tauri/target/release/bundle/msi/*.msi "dist/offline/HardwareVisualizer_${{ needs.check-version.outputs.version }}_x64_en-US_offline.msi"
- if: ${{ matrix.platform == 'windows-latest' }}
name: Upload MSI via gh CLI
run: gh release upload "v${{ needs.check-version.outputs.version }}" dist/offline/*.msi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
- name: Upload THIRD_PARTY_NOTICES.md
run: |
mv ./tmp/THIRD_PARTY_NOTICES.md ./tmp/THIRD_PARTY_NOTICES_${{ matrix.os-name }}.md
gh release upload "v${{ needs.check-version.outputs.version }}" ./tmp/THIRD_PARTY_NOTICES_${{ matrix.os-name }}.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash