added status checks #24
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: "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 | |
id: checkout | |
- name: setup node | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: yarn | |
- name: install Rust stable and target | |
id: install-rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: ${{ matrix.rust-target }} | |
- name: Rust cache | |
id: rust-cache | |
uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: './src-tauri -> target' | |
- name: install dependencies (ubuntu only) | |
id: install-dependencies-ubuntu | |
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 | |
id: install-frontend-dependencies | |
run: yarn install | |
- name: Build and Release with Tauri | |
id: build-and-release | |
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. | |
generateReleaseNotes: true # Automatically generate release notes based on commits and PRs. | |
args: ${{ matrix.args }} |