Skip to content

Commit

Permalink
update build config
Browse files Browse the repository at this point in the history
  • Loading branch information
xgi committed Dec 20, 2024
1 parent 9c9705e commit 708ed6b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.0.0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.0.0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: pnpm i
- run: pnpm build
- run: pnpm electron-builder --publish onTagOrDraft --win
- run: pnpm dist:win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-linux:
Expand All @@ -35,13 +34,12 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.0.0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: pnpm i
- run: pnpm build
- run: pnpm electron-builder --publish onTagOrDraft --linux
- run: pnpm dist:linux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-mac:
Expand All @@ -55,13 +53,12 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 9.0.0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: pnpm i
- run: pnpm build
- run: pnpm electron-builder --publish onTagOrDraft --mac
- run: pnpm dist:mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# APPLE_ID: ${{ secrets.APPLE_ID }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ coverage
out/
build
dist
release


# Debug
Expand Down
4 changes: 3 additions & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"build": "electron-vite build",
"preview": "electron-vite preview",
"lint": "biome lint src",
"package": "pnpm build && pnpm electron-builder --publish onTagOrDraft --win --mac --linux"
"dist:win": "pnpm electron-builder --publish onTagOrDraft --win",
"dist:mac": "pnpm electron-builder --publish onTagOrDraft --mac",
"dist:linux": "pnpm electron-builder --publish onTagOrDraft --linux"
},
"build": {
"productName": "Houdoku",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"preview": "turbo preview"
"preview": "turbo preview",
"dist:win": "turbo dist:win",
"dist:mac": "turbo dist:mac",
"dist:linux": "turbo dist:linux"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
Expand Down
27 changes: 26 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
],
"outputs": [
".next/**",
"!.next/cache/**"
"!.next/cache/**",
"out"
]
},
"lint": {
Expand All @@ -32,6 +33,30 @@
"preview": {
"cache": false,
"persistent": true
},
"dist:win": {
"dependsOn": [
"build"
],
"outputs": [
"release/**"
]
},
"dist:mac": {
"dependsOn": [
"build"
],
"outputs": [
"release/**"
]
},
"dist:linux": {
"dependsOn": [
"build"
],
"outputs": [
"release/**"
]
}
}
}

0 comments on commit 708ed6b

Please sign in to comment.