Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Making this an application #3030

Open
wants to merge 2 commits into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/publish-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 'Publish Tauri App'

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: Setup 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: Tauri Docs App v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"build:cli": "pnpm --filter cli-generator run build",
"build:astro": "astro build",
"build": "pnpm dev:setup && pnpm build:references && pnpm build:config && pnpm build:cli && pnpm build:releases && pnpm build:astro",
"preview": "astro preview"
"preview": "astro preview",
"tauri": "tauri"
},
"dependencies": {
"@astrojs/markdown-remark": "^5.2.0",
Expand All @@ -43,6 +44,9 @@
"starlight-blog": "^0.15.0",
"starlight-links-validator": "^0.13.0"
},
"devDependencies": {
"@tauri-apps/cli": "^2"
},
"packageManager": "[email protected]",
"engines": {
"pnpm": "^9.0.0"
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

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

6 changes: 6 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
/target/
/gen/
# Generated by Tauri
# will have schema files for capabilities auto-completion
Loading