chore: remove mirror server data #73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Multi-Platform Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # macOS Universal (Intel + Apple Silicon) | |
| - platform: 'macos-latest' | |
| target: 'universal-apple-darwin' | |
| name: 'macOS-Universal' | |
| # Windows | |
| - platform: 'windows-latest' | |
| target: 'x86_64-pc-windows-msvc' | |
| name: 'Windows-x64' | |
| # Linux | |
| - platform: 'ubuntu-22.04' | |
| target: 'x86_64-unknown-linux-gnu' | |
| name: 'Linux-x64' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.19.0' | |
| - name: Install Rust (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - name: Install Rust (Windows/Linux) | |
| if: matrix.platform != 'macos-latest' | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y libwebkit2gtk-4.1-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| build-essential curl wget file \ | |
| libssl-dev libgtk-3-dev libayatana-appindicator3-dev \ | |
| librsvg2-dev | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build (macOS Universal) | |
| if: matrix.platform == 'macos-latest' | |
| run: npm run tauri:build -- --target universal-apple-darwin --bundles app | |
| - name: Create DMG (macOS Universal) | |
| if: matrix.platform == 'macos-latest' | |
| run: | | |
| APP_PATH="src-tauri/target/universal-apple-darwin/release/bundle/macos/DuckCoding.app" | |
| DMG_DIR="src-tauri/target/universal-apple-darwin/release/bundle/dmg" | |
| APP_VERSION=$(jq -r '.version' src-tauri/tauri.conf.json) | |
| DMG_PATH="$DMG_DIR/DuckCoding_${APP_VERSION}_universal.dmg" | |
| ./scripts/make-dmg.sh "$APP_PATH" "$DMG_PATH" "DuckCoding" | |
| - name: Build (Windows/Linux) | |
| if: matrix.platform != 'macos-latest' | |
| run: npm run tauri:build | |
| - name: Upload macOS artifacts | |
| if: matrix.platform == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DuckCoding-${{ matrix.name }} | |
| path: | | |
| src-tauri/target/*/release/bundle/dmg/*.dmg | |
| src-tauri/target/*/release/bundle/macos/*.app | |
| - name: Upload Windows artifacts | |
| if: matrix.platform == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DuckCoding-${{ matrix.name }} | |
| path: | | |
| src-tauri/target/release/bundle/msi/*.msi | |
| src-tauri/target/release/bundle/nsis/*.exe | |
| - name: Upload Linux artifacts | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: DuckCoding-${{ matrix.name }} | |
| path: | | |
| src-tauri/target/release/bundle/deb/*.deb | |
| src-tauri/target/release/bundle/rpm/*.rpm | |
| src-tauri/target/release/bundle/appimage/*.AppImage | |
| create-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Display structure | |
| run: ls -R artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: false | |
| prerelease: false | |
| files: | | |
| artifacts/**/*.dmg | |
| artifacts/**/*.msi | |
| artifacts/**/*.exe | |
| artifacts/**/*.deb | |
| artifacts/**/*.rpm | |
| artifacts/**/*.AppImage | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |