Skip to content

Update publish.yml

Update publish.yml #22

Workflow file for this run

name: "publish"
on:
push:
branches:
- main
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"
rust-target: "aarch64-apple-darwin"
- platform: "macos-latest" # for Intel-based Macs.
args: "--target x86_64-apple-darwin"
rust-target: "x86_64-apple-darwin"
- platform: "ubuntu-22.04" # for Ubuntu (Tauri v2)
args: "--target x86_64-unknown-linux-gnu"
rust-target: "x86_64-unknown-linux-gnu"
- platform: "windows-latest" # for Windows
args: "--target x86_64-pc-windows-msvc"
rust-target: "x86_64-pc-windows-msvc"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- name: install Rust stable and target
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- 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
- name: install frontend dependencies
run: yarn install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: DTime__VERSION__ # The action automatically replaces __VERSION__ with the app version.
releaseName: "DTime v__VERSION__" # The action automatically replaces __VERSION__ with the app version.
releaseBody: "This is the official release of DTime version __VERSION__." # The release notes.
releaseDraft: false # Set to true if you want to create a draft release.
prerelease: false # Set to true if this is a pre-release.
args: ${{ matrix.args }}