Attempt fix monorepo build (#404)
* add latest changes and fix launcher * add optional tag specify * fix client release * empty commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
/sites
|
||||||
|
/cli
|
||||||
|
/desktop
|
||||||
|
/backend # go backend
|
||||||
|
|
||||||
|
node_modules
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
name: "Build and release desktop"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tagName:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
description: "tagName to be associated with this release."
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
# This can be used to automatically publish nightlies at UTC nighttime
|
||||||
|
# schedule:
|
||||||
|
# - cron: "0 2 * * *" # run at 2 AM UTC
|
||||||
|
|
||||||
|
# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-tauri:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: "macos-14" # for Arm based macs (M1 and above).
|
||||||
|
args: "--target aarch64-apple-darwin"
|
||||||
|
- platform: "macos-14" # 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: "ubuntu-22.04-arm"
|
||||||
|
args: "--target aarch64-unknown-linux-gnu"
|
||||||
|
- platform: "windows-latest"
|
||||||
|
args: ""
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: setup node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: lts/*
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
|
||||||
|
- name: install Rust nightly
|
||||||
|
uses: 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-14' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||||
|
|
||||||
|
- name: Rust cache
|
||||||
|
uses: swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './desktop/src-tauri -> target'
|
||||||
|
|
||||||
|
- name: install dependencies (ubuntu only)
|
||||||
|
if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' # 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 xdg-utils
|
||||||
|
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
|
||||||
|
|
||||||
|
- name: Import Apple Developer Certificate
|
||||||
|
if: matrix.platform == 'macos-14'
|
||||||
|
env:
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12
|
||||||
|
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||||
|
security default-keychain -s build.keychain
|
||||||
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
|
||||||
|
security set-keychain-settings -t 3600 -u build.keychain
|
||||||
|
|
||||||
|
|
||||||
|
echo "Created keychain"
|
||||||
|
|
||||||
|
curl https://droposs.org/drop.der --output drop.der
|
||||||
|
|
||||||
|
# swiftc libs/appletrust/add-certificate.swift
|
||||||
|
# ./add-certificate drop.der
|
||||||
|
# rm add-certificate
|
||||||
|
|
||||||
|
# echo "Added certificate to keychain using swift util"
|
||||||
|
|
||||||
|
## Script is equivalent to:
|
||||||
|
sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||||
|
sudo security add-trusted-cert -d -r trustRoot -k build.keychain -p codeSign -u -1 drop.der
|
||||||
|
sudo security authorizationdb remove com.apple.trust-settings.admin
|
||||||
|
|
||||||
|
security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
|
||||||
|
echo "Imported certificate"
|
||||||
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
|
||||||
|
security find-identity -v -p codesigning build.keychain
|
||||||
|
|
||||||
|
- name: Verify Certificate
|
||||||
|
if: matrix.platform == 'macos-14'
|
||||||
|
run: |
|
||||||
|
CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Drop OSS")
|
||||||
|
CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}')
|
||||||
|
echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV
|
||||||
|
echo "Certificate imported. Using identity: $CERT_ID"
|
||||||
|
|
||||||
|
- name: install frontend dependencies
|
||||||
|
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.
|
||||||
|
|
||||||
|
- uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
|
||||||
|
NO_STRIP: true
|
||||||
|
with:
|
||||||
|
tagName: ${{ inputs.print_tags || 'v__VERSION__' }} # the action automatically replaces \_\_VERSION\_\_ with the app version.
|
||||||
|
releaseName: "Auto-release v__VERSION__"
|
||||||
|
releaseBody: "See the assets to download this version and install. This release was created automatically."
|
||||||
|
releaseDraft: false
|
||||||
|
prerelease: true
|
||||||
|
args: ${{ matrix.args }}
|
||||||
|
projectPath: './desktop'
|
||||||
@@ -29,7 +29,6 @@ jobs:
|
|||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
|
||||||
fetch-depth: 3 # fix for when this gets triggered by tag
|
fetch-depth: 3 # fix for when this gets triggered by tag
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ RUN corepack enable
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
## so corepack knows pnpm's version
|
## so corepack knows pnpm's version
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
COPY . .
|
||||||
## prevent prompt to download
|
## prevent prompt to download
|
||||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
||||||
## setup for offline
|
## setup for offline
|
||||||
@@ -21,11 +21,11 @@ RUN pnpm install --frozen-lockfile --ignore-scripts
|
|||||||
|
|
||||||
### BUILD TORRENTIAL
|
### BUILD TORRENTIAL
|
||||||
FROM rustlang/rust:nightly-alpine AS torrential-build
|
FROM rustlang/rust:nightly-alpine AS torrential-build
|
||||||
RUN apk add musl-dev
|
RUN apk add musl-dev pkgconfig libarchive-dev libarchive
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY torrential .
|
COPY . .
|
||||||
RUN apk add protoc
|
RUN apk add protoc
|
||||||
RUN cargo build --release
|
RUN cargo build --release --manifest-path ./torrential/Cargo.toml
|
||||||
|
|
||||||
### BUILD APP
|
### BUILD APP
|
||||||
FROM base AS build-system
|
FROM base AS build-system
|
||||||
@@ -37,14 +37,15 @@ ENV NUXT_TELEMETRY_DISABLED=1
|
|||||||
RUN apk add --no-cache git
|
RUN apk add --no-cache git
|
||||||
|
|
||||||
## copy deps and rest of project files
|
## copy deps and rest of project files
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
|
|
||||||
|
|
||||||
ARG BUILD_DROP_VERSION
|
ARG BUILD_DROP_VERSION
|
||||||
ARG BUILD_GIT_REF
|
ARG BUILD_GIT_REF
|
||||||
|
|
||||||
## build
|
## build
|
||||||
RUN pnpm run postinstall && pnpm run build
|
RUN pnpm run --filter=drop postinstall && pnpm run --filter=drop build
|
||||||
|
|
||||||
|
|
||||||
# create run environment for Drop
|
# create run environment for Drop
|
||||||
@@ -55,16 +56,16 @@ ENV NUXT_TELEMETRY_DISABLED=1
|
|||||||
|
|
||||||
# RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn add --network-timeout 1000000 --no-lockfile --ignore-scripts prisma@6.11.1
|
# RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn add --network-timeout 1000000 --no-lockfile --ignore-scripts prisma@6.11.1
|
||||||
RUN apk add --no-cache pnpm 7zip nginx
|
RUN apk add --no-cache pnpm 7zip nginx
|
||||||
RUN pnpm install prisma@7.3.0
|
RUN pnpm install prisma@7.3.0 --global
|
||||||
# init prisma to download all required files
|
# init prisma to download all required files
|
||||||
RUN pnpm prisma init
|
RUN pnpm prisma init
|
||||||
|
|
||||||
COPY --from=build-system /app/prisma.config.ts ./
|
COPY --from=build-system /app/server/prisma.config.ts ./
|
||||||
COPY --from=build-system /app/.output ./app
|
COPY --from=build-system /app/server/.output ./app
|
||||||
COPY --from=build-system /app/prisma ./prisma
|
COPY --from=build-system /app/server/prisma ./prisma
|
||||||
COPY --from=build-system /app/build ./startup
|
COPY --from=build-system /app/server/build ./startup
|
||||||
COPY --from=build-system /app/build/nginx.conf /nginx.conf
|
COPY --from=build-system /app/server/build/nginx.conf /nginx.conf
|
||||||
COPY --from=torrential-build /build/target/release/torrential /usr/bin/
|
COPY --from=torrential-build /build/torrential/target/release/torrential /usr/bin/
|
||||||
|
|
||||||
ENV LIBRARY="/library"
|
ENV LIBRARY="/library"
|
||||||
ENV DATA="/data"
|
ENV DATA="/data"
|
||||||
@@ -40,7 +40,7 @@ impl ProcessHandler for WindowsLauncher {
|
|||||||
_current_dir: &str,
|
_current_dir: &str,
|
||||||
_database: &Database,
|
_database: &Database,
|
||||||
) -> Result<String, ProcessError> {
|
) -> Result<String, ProcessError> {
|
||||||
Ok(format!("cmd /C \"{}\"", launch_command))
|
Ok(format!("pwsh \"cmd /C \"{}\"\"", launch_command))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn valid_for_platform(&self, _db: &Database, _target: &Platform) -> bool {
|
fn valid_for_platform(&self, _db: &Database, _target: &Platform) -> bool {
|
||||||
|
|||||||
Submodule desktop/src-tauri/tailscale/libtailscale deleted from 78294ac1d6
Generated
+26
-2
@@ -209,8 +209,8 @@ importers:
|
|||||||
specifier: ^1.0.2
|
specifier: ^1.0.2
|
||||||
version: 1.0.2
|
version: 1.0.2
|
||||||
pino:
|
pino:
|
||||||
specifier: ^9.7.0
|
specifier: 9.7.0
|
||||||
version: 9.14.0
|
version: 9.7.0
|
||||||
pino-pretty:
|
pino-pretty:
|
||||||
specifier: ^13.0.0
|
specifier: ^13.0.0
|
||||||
version: 13.1.3
|
version: 13.1.3
|
||||||
@@ -5389,6 +5389,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-71pTBPrA9WPPsJQ0Q06ZlTQQVJPYd87xZsvFwxFqru7a6kdriMVW1Hjd37W3W13ZuF/K/Zzq6eVlAHVoZCHuQw==}
|
resolution: {integrity: sha512-71pTBPrA9WPPsJQ0Q06ZlTQQVJPYd87xZsvFwxFqru7a6kdriMVW1Hjd37W3W13ZuF/K/Zzq6eVlAHVoZCHuQw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
fast-redact@3.5.0:
|
||||||
|
resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==}
|
||||||
|
engines: {node: '>=6'}
|
||||||
|
|
||||||
fast-safe-stringify@2.1.1:
|
fast-safe-stringify@2.1.1:
|
||||||
resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
|
resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==}
|
||||||
|
|
||||||
@@ -7780,6 +7784,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w==}
|
resolution: {integrity: sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
pino@9.7.0:
|
||||||
|
resolution: {integrity: sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
pkg-types@1.3.1:
|
pkg-types@1.3.1:
|
||||||
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
|
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
|
||||||
|
|
||||||
@@ -16013,6 +16021,8 @@ snapshots:
|
|||||||
|
|
||||||
fast-npm-meta@1.5.0: {}
|
fast-npm-meta@1.5.0: {}
|
||||||
|
|
||||||
|
fast-redact@3.5.0: {}
|
||||||
|
|
||||||
fast-safe-stringify@2.1.1: {}
|
fast-safe-stringify@2.1.1: {}
|
||||||
|
|
||||||
fast-string-truncated-width@1.2.1: {}
|
fast-string-truncated-width@1.2.1: {}
|
||||||
@@ -19323,6 +19333,20 @@ snapshots:
|
|||||||
sonic-boom: 4.2.1
|
sonic-boom: 4.2.1
|
||||||
thread-stream: 3.1.0
|
thread-stream: 3.1.0
|
||||||
|
|
||||||
|
pino@9.7.0:
|
||||||
|
dependencies:
|
||||||
|
atomic-sleep: 1.0.0
|
||||||
|
fast-redact: 3.5.0
|
||||||
|
on-exit-leak-free: 2.1.2
|
||||||
|
pino-abstract-transport: 2.0.0
|
||||||
|
pino-std-serializers: 7.1.0
|
||||||
|
process-warning: 5.0.0
|
||||||
|
quick-format-unescaped: 4.0.4
|
||||||
|
real-require: 0.2.0
|
||||||
|
safe-stable-stringify: 2.5.0
|
||||||
|
sonic-boom: 4.2.1
|
||||||
|
thread-stream: 3.1.0
|
||||||
|
|
||||||
pkg-types@1.3.1:
|
pkg-types@1.3.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
confbox: 0.1.8
|
confbox: 0.1.8
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ export default withNuxt([
|
|||||||
eslintConfigPrettier,
|
eslintConfigPrettier,
|
||||||
|
|
||||||
// vue-i18n plugin
|
// vue-i18n plugin
|
||||||
|
// @ts-expect-error
|
||||||
...vueI18n.configs.recommended,
|
...vueI18n.configs.recommended,
|
||||||
|
// @ts-expect-error
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
// Optional.
|
// Optional.
|
||||||
@@ -34,8 +36,11 @@ export default withNuxt([
|
|||||||
messageSyntaxVersion: "^11.0.0",
|
messageSyntaxVersion: "^11.0.0",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
// @ts-expect-error
|
||||||
|
{
|
||||||
plugins: {
|
plugins: {
|
||||||
drop: { rules: { "no-prisma-delete": noPrismaDelete } },
|
drop: { rules: { "no-prisma-delete": noPrismaDelete } },
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
+2
-3
@@ -56,7 +56,7 @@
|
|||||||
"nuxt-security": "2.2.0",
|
"nuxt-security": "2.2.0",
|
||||||
"otp-io": "^1.2.7",
|
"otp-io": "^1.2.7",
|
||||||
"parse-cosekey": "^1.0.2",
|
"parse-cosekey": "^1.0.2",
|
||||||
"pino": "^9.7.0",
|
"pino": "9.7.0",
|
||||||
"pino-pretty": "^13.0.0",
|
"pino-pretty": "^13.0.0",
|
||||||
"prisma": "7.3.0",
|
"prisma": "7.3.0",
|
||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "^1.6.3",
|
||||||
@@ -103,6 +103,5 @@
|
|||||||
"vue3-carousel-nuxt": {
|
"vue3-carousel-nuxt": {
|
||||||
"vue3-carousel": "^0.16.0"
|
"vue3-carousel": "^0.16.0"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"packageManager": "pnpm@10.29.1+sha512.48dae233635a645768a3028d19545cacc1688639eeb1f3734e42d6d6b971afbf22aa1ac9af52a173d9c3a20c15857cfa400f19994d79a2f626fcc73fccda9bbc"
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user