diff options
| author | 2026-01-18 22:13:25 +0800 | |
|---|---|---|
| committer | 2026-01-18 22:13:25 +0800 | |
| commit | 53d3d71b69408b5fade60fbc41cee3d8e0946cbe (patch) | |
| tree | eb54be440ee6fe7af30ea54cc2f689563dc28ef8 /.github | |
| parent | 30a7da9eb1734e19bdb98083bdaae757e0ce9b3a (diff) | |
| parent | 09b2e0f84721587f0b0a59818ebc5720c447ebb8 (diff) | |
| download | DropOut-53d3d71b69408b5fade60fbc41cee3d8e0946cbe.tar.gz DropOut-53d3d71b69408b5fade60fbc41cee3d8e0946cbe.zip | |
Adopt Semifold CI and prepare 0.2.0-alpha pre-release (#62)
Refer: http://semifold.noctisynth.org/
## Summary by Sourcery
Adopt Semifold-based release management and prepare the project for a
0.2.0-alpha pre-release across Rust and UI packages.
New Features:
- Introduce Semifold CI release workflow to orchestrate builds,
publishing, and changelog management.
- Add Semifold status workflow to report release status on pull
requests.
- Add workspace-level Node tooling and scripts to manage Tauri version
bumping and project preparation.
Enhancements:
- Refactor GitHub Actions workflows for build, test, check, and lint to
simplify pnpm usage, update action versions, and standardize artifact
paths.
- Move Rust profile configuration into a new Cargo workspace and add a
pnpm workspace for the UI package.
- Configure Semifold changelog and release metadata for Rust and Node
packages, including alpha pre-release tagging.
Build:
- Replace the tag-triggered GitHub release workflow with a branch-based
Semifold CI pipeline that builds artifacts for Linux, macOS, and Windows
and uploads them for publishing.
- Update CI action versions (checkout, setup-node, upload-artifact,
download-artifact) and adjust Rust cache configuration and artifact
locations.
- Add root workspace package.json, pnpm-workspace.yaml, and pnpm
overrides to centralize tooling and dependency management.
CI:
- Add a dedicated Semifold status GitHub Actions workflow for pull
requests to main.
- Update existing check, lint, test, and build workflows to align with
the new workspace layout and artifact directories.
Deployment:
- Integrate Semifold configuration for automated publishing to crates.io
and npm, including pre-checks, post-version hooks, and use of stored
build artifacts in releases.
Tests:
- Adjust test workflow artifact paths to match the new target directory
structure and workspace configuration.
Chores:
- Remove unused Python packaging files and old Node lockfiles that are
no longer part of the build or release process.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/check.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/semifold-ci.yaml (renamed from .github/workflows/release.yml) | 151 | ||||
| -rw-r--r-- | .github/workflows/semifold-status.yaml | 26 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 20 |
5 files changed, 122 insertions, 79 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 773cc21..8ee79a4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -22,8 +22,6 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v4 - with: - version: latest - name: Install Node.js uses: actions/setup-node@v6 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bfa9530..b1e7254 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,8 +21,6 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v4 - with: - version: latest - name: Install Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/semifold-ci.yaml index 82399e5..bb32da7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/semifold-ci.yaml @@ -1,92 +1,65 @@ -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] + pull_request: + 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" + - os: 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" + - platform: "windows-latest" + name: "Windows x86_64 (GNU)" + target: "x86_64-pc-windows-gnu" + args: "--target x86_64-pc-windows-gnu" - platform: "windows-11-arm" - name: "Windows ARM64" + name: "Windows arm64" target: "aarch64-pc-windows-msvc" args: "--target aarch64-pc-windows-msvc" 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' @@ -102,11 +75,9 @@ jobs: - 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" @@ -124,9 +95,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 +114,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 +140,60 @@ 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: 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 8c7c50c..402de0e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,8 +75,6 @@ jobs: - name: Install pnpm if: github.event_name == 'workflow_dispatch' uses: pnpm/action-setup@v4 - with: - version: latest - name: Install Frontend Dependencies if: github.event_name == 'workflow_dispatch' @@ -89,8 +87,6 @@ jobs: - name: Rust Cache uses: swatinem/rust-cache@v2 - with: - workspaces: ./src-tauri - name: Run Tests working-directory: ./src-tauri @@ -116,9 +112,9 @@ jobs: 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) @@ -127,9 +123,9 @@ jobs: 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) @@ -138,6 +134,6 @@ jobs: 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 |