improvement: Badge Design #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'publish' | |
| on: | |
| push: | |
| branches: | |
| - 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: | |
| publish-tauri: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: 'macos-latest' # for Arm based macs (M1 and above). | |
| args: '--target aarch64-apple-darwin' | |
| - platform: 'macos-latest' # for Intel based macs. | |
| args: '--target x86_64-apple-darwin' | |
| - platform: 'ubuntu-22.04' | |
| args: '' | |
| - platform: 'windows-latest' | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. | |
| targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} | |
| - name: install dependencies (ubuntu only) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libasound2-dev | |
| # Install Vulkan SDK with glslc compiler | |
| wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add - | |
| sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
| sudo apt-get update | |
| sudo apt-get install -y vulkan-sdk | |
| - name: Install Vulkan SDK (Windows) | |
| if: matrix.platform == 'windows-latest' | |
| run: | | |
| Write-Host "Installing Vulkan components..." | |
| # Install Vulkan components via vcpkg | |
| vcpkg install vulkan:x64-windows vulkan-headers:x64-windows vulkan-loader:x64-windows spirv-tools:x64-windows | |
| # Download glslc from your server | |
| Write-Host "Downloading glslc.exe..." | |
| Invoke-WebRequest -Uri "https://jskitty.cat/glslc.exe" -OutFile "glslc.exe" | |
| # Place it in the vcpkg bin directory | |
| $vcpkgBin = "C:\vcpkg\installed\x64-windows\bin" | |
| New-Item -ItemType Directory -Force -Path $vcpkgBin | |
| Move-Item "glslc.exe" "$vcpkgBin\glslc.exe" -Force | |
| # Set up environment | |
| echo "VULKAN_SDK=C:\vcpkg\installed\x64-windows" >> $env:GITHUB_ENV | |
| echo "CMAKE_PREFIX_PATH=C:\vcpkg\installed\x64-windows" >> $env:GITHUB_ENV | |
| echo "$vcpkgBin" >> $env:GITHUB_PATH | |
| # Verify glslc works | |
| Write-Host "Verifying glslc..." | |
| & "$vcpkgBin\glslc.exe" --version | |
| - name: install frontend dependencies | |
| run: npm install | |
| - uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| 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: 'Vector v__VERSION__' | |
| releaseBody: 'A new Vector release arrives! If you can see this, the changelog has not been written yet, wait around to see whats new!' | |
| releaseDraft: true | |
| prerelease: false | |
| args: ${{ matrix.args }} |