Skip to content

Commit

Permalink
Merge pull request #1 from omznc/workflow
Browse files Browse the repository at this point in the history
feat/workflow
  • Loading branch information
omznc authored Oct 11, 2024
2 parents a746b42 + 37e5985 commit 7735eba
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 17 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: 'publish'

on:
workflow_dispatch:
push:
branches:
- 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: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm' # Set this to npm, yarn or pnpm.

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
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: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install frontend dependencies
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
run: pnpm install # change this to npm or pnpm depending on which one you use.

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'Tauri v__VERSION__'
releaseBody: 'Full changelog pending. See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "discappear",
"private": true,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"bump": "pnpm dlx tauri-version patch",
"tauri": "tauri",
"format": "bunx @biomejs/biome format --write ."
"format": "pnpm dlx @biomejs/biome format --write ."
},
"dependencies": {
"@biomejs/biome": "^1.9.3",
Expand Down
10 changes: 0 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "discappear"
version = "0.1.1"
version = "0.1.2"
description = "A Tauri App"
authors = ["you"]
edition = "2021"
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0",
"productName": "discappear",
"version": "0.1.1",
"version": "0.1.2",
"identifier": "com.discappear.app",
"build": {
"beforeDevCommand": "bun run dev",
"beforeDevCommand": "pnpm run dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "bun run build",
"beforeBuildCommand": "pnpm run build",
"frontendDist": "../dist"
},
"app": {
Expand Down

0 comments on commit 7735eba

Please sign in to comment.