chore: add rolling release

This commit is contained in:
zhom
2025-05-29 22:53:18 +04:00
parent 854f1b4742
commit cf57b2a043
4 changed files with 96 additions and 72 deletions
+2 -38
View File
@@ -58,53 +58,17 @@ jobs:
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
echo "DEBUG: Installing nodecar dependencies..."
pnpm install --ignore-workspace --frozen-lockfile
echo "DEBUG: Current directory: $(pwd)"
echo "DEBUG: Contents of nodecar directory:"
ls -la
echo "DEBUG: Checking if package.json exists:"
cat package.json | head -20
echo "DEBUG: Checking pnpm version and cache:"
pnpm --version
echo "DEBUG: Running pnpm install..."
pnpm install --frozen-lockfile
echo "DEBUG: After pnpm install - checking node_modules:"
ls -la node_modules/ | head -20
echo "DEBUG: Checking what TypeScript can resolve:"
npx tsc --noEmit --listFiles | head -20 || echo "TypeScript check failed"
pnpm install --ignore-workspace --frozen-lockfile
- name: Build nodecar binary
shell: bash
working-directory: ./nodecar
run: |
echo "DEBUG: Building nodecar binary..."
echo "DEBUG: Current directory: $(pwd)"
echo "DEBUG: Contents of nodecar directory:"
ls -la
echo "DEBUG: Checking if node_modules still exists:"
ls -la node_modules/ | head -10 || echo "node_modules not found!"
echo "DEBUG: Checking TypeScript config:"
cat tsconfig.json
echo "DEBUG: Checking src directory:"
ls -la src/
echo "DEBUG: Testing individual imports:"
echo "import { program } from 'commander';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "Commander import failed"
echo "import getPort from 'get-port';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "get-port import failed"
echo "import * as ProxyChain from 'proxy-chain';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "proxy-chain import failed"
rm test-import.ts
echo "DEBUG: Running build script based on OS..."
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
echo "DEBUG: Running Linux x64 build..."
pnpm run build:linux-x64
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
echo "DEBUG: Running macOS aarch64 build..."
pnpm run build:aarch64
elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then
echo "DEBUG: Running Windows x64 build..."
pnpm run build:win-x64
fi
@@ -127,7 +91,7 @@ jobs:
working-directory: src-tauri
- name: Run clippy check and deny warnings
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all
working-directory: src-tauri
- name: Run Rust unit tests
+1 -34
View File
@@ -89,45 +89,12 @@ jobs:
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
echo "DEBUG: Installing nodecar dependencies..."
pnpm install --ignore-workspace --frozen-lockfile
echo "DEBUG: Current directory: $(pwd)"
echo "DEBUG: Contents of nodecar directory:"
ls -la
echo "DEBUG: Checking if package.json exists:"
cat package.json | head -20
echo "DEBUG: Checking pnpm version and cache:"
pnpm --version
echo "DEBUG: Running pnpm install..."
pnpm install --frozen-lockfile
echo "DEBUG: After pnpm install - checking node_modules:"
ls -la node_modules/ | head -20
echo "DEBUG: Checking what TypeScript can resolve:"
npx tsc --noEmit --listFiles | head -20 || echo "TypeScript check failed"
pnpm install --ignore-workspace --frozen-lockfile
- name: Build nodecar sidecar
shell: bash
working-directory: ./nodecar
run: |
echo "DEBUG: Building nodecar sidecar..."
echo "DEBUG: Current directory: $(pwd)"
echo "DEBUG: Contents of nodecar directory:"
ls -la
echo "DEBUG: Checking if node_modules still exists:"
ls -la node_modules/ | head -10 || echo "node_modules not found!"
echo "DEBUG: Checking TypeScript config:"
cat tsconfig.json
echo "DEBUG: Checking src directory:"
ls -la src/
echo "DEBUG: Testing individual imports:"
echo "import { program } from 'commander';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "Commander import failed"
echo "import getPort from 'get-port';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "get-port import failed"
echo "import * as ProxyChain from 'proxy-chain';" > test-import.ts
npx tsc --noEmit test-import.ts || echo "proxy-chain import failed"
rm test-import.ts
echo "DEBUG: Running nodecar build script..."
pnpm run ${{ matrix.nodecar_script }}
- name: Copy nodecar binary to Tauri binaries
+91
View File
@@ -0,0 +1,91 @@
name: Rolling Release
on:
push:
branches:
- main
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
jobs:
rolling-release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
arch: "aarch64"
target: "aarch64-apple-darwin"
pkg_target: "latest-macos-arm64"
nodecar_script: "build:aarch64"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
arch: "x86_64"
target: "x86_64-apple-darwin"
pkg_target: "latest-macos-x64"
nodecar_script: "build:x86_64"
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workdir: ./src-tauri
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Install nodecar dependencies
working-directory: ./nodecar
run: |
pnpm install --ignore-workspace --frozen-lockfile
- name: Build nodecar sidecar
shell: bash
working-directory: ./nodecar
run: |
pnpm run ${{ matrix.nodecar_script }}
- name: Copy nodecar binary to Tauri binaries
run: |
mkdir -p src-tauri/binaries
cp nodecar/dist/nodecar src-tauri/binaries/nodecar-${{ matrix.target }}
- name: Build frontend
run: pnpm build
- name: Get commit hash
id: commit
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: "alpha-${{ steps.commit.outputs.hash }}"
releaseName: "Donut Browser Alpha (Build ${{ steps.commit.outputs.hash }})"
releaseBody: "⚠️ **Alpha Release** - This is an automatically generated pre-release build from the latest main branch. Use with caution.\n\nCommit: ${{ github.sha }}\nBuild: ${{ steps.commit.outputs.hash }}"
releaseDraft: false
prerelease: true
args: ${{ matrix.args }}
+2
View File
@@ -8,6 +8,7 @@
"build": "next build",
"start": "next start",
"lint": "prettier --check src/ && tsc --noEmit && next lint",
"lint:rust": "cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings -D clippy::all",
"tauri": "tauri",
"shadcn:add": "pnpm dlx shadcn@latest add",
"prepare": "husky",
@@ -72,6 +73,7 @@
],
"src-tauri/**/*.rs": [
"cd src-tauri && cargo fmt --all",
"cd src-tauri && cargo clippy --all-targets --all-features -- -D warnings -D clippy::all",
"cd src-tauri && cargo test"
]
}