Skip to content

Commit

Permalink
add prerelease tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
L4Ph committed Sep 22, 2024
1 parent 777e2d5 commit f47d1fb
Show file tree
Hide file tree
Showing 29 changed files with 1,052 additions and 309 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 'publish'

on:
workflow_dispatch:

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' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt update
sudo apt install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
run: bun install --frozen-lockfile

- name: Get current date
env:
TZ: 'Asia/Tokyo'
id: date
run: echo "RELEASE_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV

- name: Fetch existing tags
run: |
gh auth setup-git
TAGS=$(gh release list --limit 100 | grep -E "^${{ env.RELEASE_DATE }}([.][0-9]+)?$" | awk '{print $1}')
if [ -z "$TAGS" ]; then
PATCH=0
else
PATCH=$(echo "$TAGS" | sed 's/.*\.//' | sort -nr | head -n1)
PATCH=$((PATCH + 1))
fi
echo "RELEASE_TAG=${{ env.RELEASE_DATE }}.${PATCH}" >> $GITHUB_ENV
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ env.RELEASE_TAG }}
releaseName: 'Version: ${{ env.RELEASE_TAG }}'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
11 changes: 6 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"recommendations": [
"svelte.svelte-vscode",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer"
]
"recommendations": [
"svelte.svelte-vscode",
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer",
"biomejs.biome"
]
}
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"svelte.enable-ts-plugin": true
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit"
}
}
49 changes: 49 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": true,
"ignore": [
"node_modules",
".svelte-kit",
"build",
"src/lib/components/ui/**",
"src-tauri/**"
]
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"overrides": [
{
"include": ["*.svelte", "*.astro", "*.vue"],
"linter": {
"rules": {
"style": {
"useConst": "off",
"useImportType": "off"
}
}
}
}
]
}
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
"utils": "$lib/utils"
},
"typescript": true
}
}
102 changes: 54 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,56 @@
{
"name": "narrow",
"version": "0.1.0",
"description": "",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"deploy": "bun run build && bunx wrangler pages deploy",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"tauri": "tauri"
},
"license": "MIT",
"dependencies": {
"@fontsource-variable/m-plus-2": "^5.1.0",
"@l4ph/web-novel-parser": "npm:@jsr/l4ph__web-novel-parser",
"@macfja/svelte-persistent-store": "^2.4.1",
"@tauri-apps/api": "^2.0.0-rc.4",
"@tauri-apps/plugin-fs": "^2.0.0-rc.2",
"bits-ui": "^0.21.15",
"clsx": "^2.1.1",
"lucide-svelte": "^0.441.0",
"lz-string": "^1.5.0",
"mode-watcher": "^0.4.1",
"svelte-codemirror-editor": "^1.4.1",
"svelte-file-dropzone": "^2.0.8",
"svelte-sonner": "^0.3.28",
"tailwind-merge": "^2.5.2",
"tailwind-variants": "^0.2.1"
},
"devDependencies": {
"@svelte-put/shortcut": "^3.1.1",
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/kit": "^2.5.27",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/typography": "^0.5.15",
"@tauri-apps/cli": "^2.0.0-rc.16",
"@types/node": "^22.5.5",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.10",
"svelte": "^4.2.19",
"svelte-check": "^4.0.2",
"tailwindcss": "^3.4.11",
"tslib": "^2.4.1",
"typescript": "^5.6.2",
"vite": "^5.4.5"
}
"name": "narrow",
"version": "0.1.0",
"description": "",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"deploy": "bun run build && bunx wrangler pages deploy",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"tauri": "tauri",
"lint": "biome lint",
"format": "biome format --write"
},
"license": "MIT",
"dependencies": {
"@fontsource-variable/m-plus-2": "^5.1.0",
"@l4ph/web-novel-parser": "npm:@jsr/l4ph__web-novel-parser",
"@macfja/svelte-persistent-store": "^2.4.1",
"@tauri-apps/api": "^2.0.0-rc.4",
"@tauri-apps/cli": "^2.0.0-rc.16",
"@tauri-apps/plugin-dialog": "^2.0.0-rc.1",
"@tauri-apps/plugin-fs": "^2.0.0-rc.2",
"bits-ui": "^0.21.15",
"clsx": "^2.1.1",
"lucide-svelte": "^0.441.0",
"lz-string": "^1.5.0",
"mode-watcher": "^0.4.1",
"svelte-codemirror-editor": "^1.4.1",
"svelte-file-dropzone": "^2.0.8",
"svelte-sonner": "^0.3.28",
"tailwind-merge": "^2.5.2",
"tailwind-variants": "^0.2.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.2",
"@svelte-put/shortcut": "^3.1.1",
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/kit": "^2.5.27",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.7",
"@tailwindcss/typography": "^0.5.15",
"@types/bun": "latest",
"@types/node": "^22.5.5",
"autoprefixer": "^10.4.20",
"eslint-plugin-svelte": "^2.44.0",
"svelte": "^5.0.0-next.257",
"svelte-check": "^4.0.2",
"tailwindcss": "^3.4.11",
"tslib": "^2.4.1",
"typescript": "^5.6.2",
"vite": "^5.4.5"
},
"module": "index.ts"
}
10 changes: 5 additions & 5 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Loading

0 comments on commit f47d1fb

Please sign in to comment.