aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2026-01-20 13:44:21 +0800
committerGitHub <noreply@github.com>2026-01-20 13:44:21 +0800
commit7338b8627833018a0e3c05c3c4f3cc7fc182e8d2 (patch)
tree23e39e5603aadc10d6b2d7efad063c68f357a860 /.github/workflows
parentdbf781a35b96252e0199fec4337515651e49a8f6 (diff)
parentcf6cd6ba667b35e352b705946420cf4acab2b004 (diff)
downloadDropOut-7338b8627833018a0e3c05c3c4f3cc7fc182e8d2.tar.gz
DropOut-7338b8627833018a0e3c05c3c4f3cc7fc182e8d2.zip
[Chore] branch: Sync with main (#75)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/check.yml23
-rw-r--r--.github/workflows/lint.yml15
-rw-r--r--.github/workflows/prek.yml8
-rw-r--r--.github/workflows/semifold-ci.yaml (renamed from .github/workflows/release.yml)176
-rw-r--r--.github/workflows/semifold-status.yaml26
-rw-r--r--.github/workflows/test.yml38
6 files changed, 164 insertions, 122 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
index ba8ce54..3cbad39 100644
--- a/.github/workflows/check.yml
+++ b/.github/workflows/check.yml
@@ -3,11 +3,11 @@ name: UI Checker
on:
push:
paths:
- - "ui/**"
+ - "packages/**"
- ".github/workflows/check.yml"
pull_request:
paths:
- - "ui/**"
+ - "packages/**"
- ".github/workflows/check.yml"
workflow_dispatch:
@@ -17,29 +17,26 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
-
+ - name: Checkout
+ uses: actions/checkout@v6
+
- name: Install pnpm
uses: pnpm/action-setup@v4
- with:
- version: 9
- name: Install Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v6
with:
node-version: 22
cache: "pnpm"
- cache-dependency-path: "ui/pnpm-lock.yaml"
+ cache-dependency-path: "pnpm-lock.yaml"
- run: pnpm install
- working-directory: ui
- run: pnpm check
- working-directory: ui
+ working-directory: packages/ui
- run: pnpm lint
- working-directory: ui
+ working-directory: packages/ui
- run: pnpm format
- working-directory: ui
-
+ working-directory: packages/ui
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 5c4a69d..d5bd131 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -4,7 +4,7 @@ on:
push:
branches: ["main", "dev"]
paths:
- - "ui/**"
+ - "packages/**"
workflow_dispatch:
permissions:
@@ -15,30 +15,27 @@ jobs:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
-
+
- name: Install pnpm
uses: pnpm/action-setup@v4
- with:
- version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- cache-dependency-path: "ui/pnpm-lock.yaml"
+ cache-dependency-path: "pnpm-lock.yaml"
- run: pnpm install
- working-directory: ui
- run: pnpm format
- working-directory: ui
+ working-directory: packages/ui
- run: pnpm lint:fix
- working-directory: ui
+ working-directory: packages/ui
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml
index 8e43763..5362472 100644
--- a/.github/workflows/prek.yml
+++ b/.github/workflows/prek.yml
@@ -14,14 +14,14 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout code
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
-
+
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
-
+
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
@@ -34,7 +34,7 @@ jobs:
libayatana-appindicator3-dev \
librsvg2-dev \
pkg-config
-
+
- name: Run prek
id: prek
uses: j178/prek-action@v1
diff --git a/.github/workflows/release.yml b/.github/workflows/semifold-ci.yaml
index 82399e5..7938a9d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/semifold-ci.yaml
@@ -1,120 +1,82 @@
-name: Release
-
+name: Semifold CI
on:
push:
- tags:
- - "v*"
- workflow_dispatch:
- inputs:
- tag_name:
- description: "Tag name to release (e.g., v1.0.0)"
- required: true
- default: "v1.0.0"
+ branches: [main]
env:
CARGO_TERM_COLOR: always
+ CLICOLOR_FORCE: 1
permissions:
+ id-token: write
contents: write
+ pull-requests: write
jobs:
- promote-release:
- name: Create Release & Changelog
- permissions:
- contents: write
- runs-on: ubuntu-latest
- outputs:
- release_id: ${{ steps.create_release.outputs.id }}
- release_body: ${{ steps.changelog.outputs.changes }}
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- - name: Generate CHANGELOG
- id: changelog
- uses: requarks/changelog-action@v1
- with:
- token: ${{ github.token }}
- tag: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
- changelogFilePath: CHANGELOG.md
- includeInvalidCommits: true
- useGitmojis: false
-
- - name: Create Release
- id: create_release
- uses: softprops/action-gh-release@v1
- with:
- tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
- name: "DropOut ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}"
- body: ${{ steps.changelog.outputs.changes }}
- draft: true
- prerelease: false
-
build-tauri:
- name: Build & Upload (${{ matrix.name }})
- needs: promote-release
- permissions:
- contents: write
+ name: Build on ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
+ # Linux
- platform: "ubuntu-22.04"
- name: "Linux x86_64"
+ name: "Linux x86_64 (GNU)"
target: "x86_64-unknown-linux-gnu"
args: "--target x86_64-unknown-linux-gnu"
+ # - platform: "ubuntu-latest"
+ # name: "Linux x86_64 (Musl)"
+ # target: "x86_64-unknown-linux-musl"
+ # args: "--target x86_64-unknown-linux-musl"
- platform: "ubuntu-24.04-arm"
- name: "Linux ARM64"
+ name: "Linux arm64"
target: "aarch64-unknown-linux-gnu"
args: "--target aarch64-unknown-linux-gnu"
+ # macOS
- platform: "macos-latest"
- name: "macOS ARM64"
+ name: "macOS x86_64"
+ target: "x86_64-apple-darwin"
+ args: "--target x86_64-apple-darwin"
+ - platform: "macos-latest"
+ name: "macOS arm64"
target: "aarch64-apple-darwin"
args: "--target aarch64-apple-darwin"
+ # Windows
- platform: "windows-latest"
- name: "Windows x86_64"
+ name: "Windows x86_64 (MSVC)"
target: "x86_64-pc-windows-msvc"
- args: "--target x86_64-pc-windows-msvc"
+ args: "--target x86_64-pc-windows-msvc --bundles nsis"
+ # - platform: "windows-latest"
+ # name: "Windows x86_64 (GNU)"
+ # target: "x86_64-pc-windows-gnu"
+ # args: "--target x86_64-pc-windows-gnu --bundles nsis"
- platform: "windows-11-arm"
- name: "Windows ARM64"
+ name: "Windows arm64"
target: "aarch64-pc-windows-msvc"
- args: "--target aarch64-pc-windows-msvc"
+ args: "--target aarch64-pc-windows-msvc --bundles nsis"
runs-on: ${{ matrix.platform }}
- container:
- image: ${{ matrix.container }}
- options: --user root
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install Dependencies (Linux x86_64)
- if: matrix.platform == 'ubuntu-22.04'
- run: |
- sudo apt-get update
- sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2
-
- - name: Install Dependencies (Linux ARM64)
- if: matrix.platform == 'ubuntu-24.04-arm'
+ if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libfuse2
- name: Install pnpm
uses: pnpm/action-setup@v4
- with:
- version: 9
- name: Install Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v6
with:
node-version: 22
cache: "pnpm"
- cache-dependency-path: "ui/pnpm-lock.yaml"
+ cache-dependency-path: "pnpm-lock.yaml"
- - name: Install Frontend Dependencies
+ - name: Install Node.js Dependencies
run: pnpm install
- working-directory: ui
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
@@ -124,9 +86,8 @@ jobs:
- name: Rust Cache
uses: swatinem/rust-cache@v2
with:
- workspaces: "./src-tauri -> target"
shared-key: ${{ matrix.target }}
-
+
- name: Setup appimagetool (Linux)
if: startsWith(matrix.platform, 'ubuntu') && !startsWith(matrix.platform, 'macos') && !startsWith(matrix.platform, 'windows')
run: |
@@ -144,7 +105,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- releaseId: ${{ needs.promote-release.outputs.release_id }}
args: ${{ matrix.args }}
- name: Fix AppImage for Wayland (Linux)
@@ -171,4 +131,70 @@ jobs:
appimagetool squashfs-root "$APPIMAGE"
rm -rf squashfs-root
fi
- working-directory: src-tauri/target/release
+ working-directory: target/release
+
+ - name: Upload Artifact (Linux)
+ if: runner.os == 'Linux'
+ uses: actions/upload-artifact@v6
+ with:
+ name: linux-${{ matrix.target }}-artifacts
+ path: |
+ target/${{ matrix.target }}/release/bundle/appimage/*.AppImage
+ target/${{ matrix.target }}/release/bundle/deb/*.deb
+ target/${{ matrix.target }}/release/bundle/appimage/*.rpm
+ retention-days: 1
+
+ - name: Upload Artifact (Windows)
+ if: runner.os == 'Windows'
+ uses: actions/upload-artifact@v6
+ with:
+ name: windows-${{ matrix.target }}-artifacts
+ path: |
+ target/${{ matrix.target }}/release/bundle/msi/*.msi
+ target/${{ matrix.target }}/release/bundle/nsis/*.exe
+ retention-days: 1
+
+ - name: Upload Artifact (macOS)
+ if: runner.os == 'macOS'
+ uses: actions/upload-artifact@v6
+ with:
+ name: macos-${{ matrix.target }}-artifacts
+ path: |
+ target/${{ matrix.target }}/release/bundle/dmg/*.dmg
+ target/${{ matrix.target }}/release/bundle/macos/*.app.tar.gz
+ retention-days: 1
+
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ needs: [build-tauri]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ - name: Setup Semifold
+ uses: noctisynth/setup-semifold@main
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Install Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: 22
+ cache: "pnpm"
+ cache-dependency-path: "pnpm-lock.yaml"
+ - name: Install Node.js Dependencies
+ run: pnpm install
+ - name: Download build artifacts
+ uses: actions/download-artifact@v6
+ with:
+ path: artifacts/
+ merge-multiple: true
+ - name: List artifacts
+ run: ls -R artifacts/
+ - name: Semifold CI
+ run: semifold ci
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
+ NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
diff --git a/.github/workflows/semifold-status.yaml b/.github/workflows/semifold-status.yaml
new file mode 100644
index 0000000..70225f6
--- /dev/null
+++ b/.github/workflows/semifold-status.yaml
@@ -0,0 +1,26 @@
+name: Semifold Status
+on:
+ pull_request:
+ branches: [main]
+
+env:
+ CLICOLOR_FORCE: 1
+
+permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+
+jobs:
+ status:
+ name: Status
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ - name: Setup Semifold
+ uses: noctisynth/setup-semifold@main
+ - name: Semifold Status
+ run: semifold status
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8bf6d2f..b58d10e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,11 +1,11 @@
-name: Test & Build
+name: Unit Test
on:
push:
branches: ["main"]
paths-ignore:
- "**.md"
- - "ui/**"
+ - "packages/**"
pull_request:
branches: ["main"]
workflow_dispatch:
@@ -40,7 +40,8 @@ jobs:
name: "macOS"
steps:
- - uses: actions/checkout@v4
+ - name: Checkout
+ uses: actions/checkout@v6
- name: Install Dependencies (Ubuntu)
if: runner.os == 'Linux' && !matrix.wayland
@@ -67,19 +68,16 @@ jobs:
- name: Install Node.js
if: github.event_name == 'workflow_dispatch'
- uses: actions/setup-node@v4
+ uses: actions/setup-node@v6
with:
node-version: 22
- name: Install pnpm
if: github.event_name == 'workflow_dispatch'
- uses: pnpm/action-setup@v2
- with:
- version: 9
+ uses: pnpm/action-setup@v4
- name: Install Frontend Dependencies
if: github.event_name == 'workflow_dispatch'
- working-directory: ./ui
run: pnpm install
- name: Install Tauri CLI
@@ -88,8 +86,6 @@ jobs:
- name: Rust Cache
uses: swatinem/rust-cache@v2
- with:
- workspaces: ./src-tauri
- name: Run Tests
working-directory: ./src-tauri
@@ -111,32 +107,32 @@ jobs:
- name: Upload Artifact (Linux)
if: runner.os == 'Linux' && github.event_name == 'workflow_dispatch'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: dropout-linux-${{ matrix.wayland && 'arch' || 'ubuntu' }}-${{ steps.slug.outputs.sha8 }}
path: |
- src-tauri/target/debug/bundle/appimage/*.AppImage
- src-tauri/target/debug/bundle/deb/*.deb
- src-tauri/target/debug/dropout
+ target/debug/bundle/appimage/*.AppImage
+ target/debug/bundle/deb/*.deb
+ target/debug/dropout
retention-days: 5
- name: Upload Artifact (Windows)
if: runner.os == 'Windows' && github.event_name == 'workflow_dispatch'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: dropout-windows-${{ steps.slug.outputs.sha8 }}
path: |
- src-tauri/target/debug/bundle/msi/*.msi
- src-tauri/target/debug/bundle/nsis/*.exe
- src-tauri/target/debug/dropout.exe
+ target/debug/bundle/msi/*.msi
+ target/debug/bundle/nsis/*.exe
+ target/debug/dropout.exe
retention-days: 5
- name: Upload Artifact (macOS)
if: runner.os == 'macOS' && github.event_name == 'workflow_dispatch'
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v6
with:
name: dropout-macos-${{ steps.slug.outputs.sha8 }}
path: |
- src-tauri/target/debug/bundle/dmg/*.dmg
- src-tauri/target/debug/bundle/macos/DropOut.app
+ target/debug/bundle/dmg/*.dmg
+ target/debug/bundle/macos/DropOut.app
retention-days: 5