release #89
Workflow file for this run
This file contains 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: release | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-11, macos-14, ubuntu-latest ] | |
name: build ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
### DO NOT REMOVE: uncomment if you need to debug runner ### | |
# - name: setup tmate session | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# detached: true | |
# Setup Rust | |
- uses: dtolnay/[email protected] | |
with: | |
components: rustfmt | |
# Setup Node.js | |
- name: setup node | |
uses: actions/[email protected] | |
with: | |
node-version: 18 | |
# checkout | |
- name: checkout source | |
uses: actions/[email protected] | |
- name: install dependencies (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install -y lld libsoup2.4-dev libgdk3.0-cil-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev | |
- name: install dependencies (windows only) | |
if: matrix.os == 'windows-latest' | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: '11.0' | |
directory: ${{ runner.temp }}/llvm | |
- name: Set LIBCLANG_PATH | |
if: matrix.os == 'windows-latest' | |
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV | |
# Package the windows dependencies | |
- name: copy gmp.dll for build | |
if: matrix.os == 'windows-latest' | |
run: | | |
$var = (get-item $(rustup which rustc)).Directory.Parent.FullName+ '\lib\rustlib\' + (rustc -vV | findstr "host:*").split(':')[1].Trim() + '\lib' | |
Copy-Item ('${{ github.workspace }}' + '\redist' + '\x86_64\*') -Destination $var -Recurse | |
######## CACHE ######## | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: ./src-tauri | |
shared-key: "${{ matrix.os }}" | |
cache-on-failure: true | |
######## BUILD ######## | |
- name: yarn installation | |
run: yarn install | |
- name: pre-build rust | |
working-directory: ./src-tauri | |
run: cargo b --release | |
- name: Build Tauri | |
id: build-tauri | |
uses: tauri-apps/[email protected] | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
TAURI_PRIVATE_KEY: '${{secrets.TAURI_PRIVATE_KEY}}' | |
TAURI_KEY_PASSWORD: '${{secrets.TAURI_KEY_PASSWORD}}' | |
with: | |
args: ${{contains(github.ref, 'canary') && '--config src-tauri/tauri.conf.canary.json --features carpe-canary' || '' }} | |
# pass the rust feature flags for canary if the tag includes "canary" | |
tagName: ${{contains(github.ref, 'canary') && 'v__VERSION__-canary' || 'v__VERSION__' }} | |
# the action automatically replaces \_\_VERSION\_\_ with the app version | |
releaseName: ${{contains(github.ref, 'canary') && 'v__VERSION__-canary' || 'v__VERSION__' }} | |
releaseBody: '[draft]' | |
releaseDraft: true | |
prerelease: false | |
includeUpdaterJson: true |