docs: rename Pi UI to Pico in README #141
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: Release | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - name: Release Please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| config-file: release-please-config.json | |
| manifest-file: .release-please-manifest.json | |
| build: | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-22.04 | |
| artifact: pi-server-linux-x86_64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-22.04 | |
| artifact: pi-server-linux-aarch64 | |
| - target: x86_64-apple-darwin | |
| os: macos-14 | |
| artifact: pi-server-macos-x86_64 | |
| - target: aarch64-apple-darwin | |
| os: macos-14 | |
| artifact: pi-server-macos-aarch64 | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-2022 | |
| artifact: pi-server-windows-x86_64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Enable Corepack | |
| shell: bash | |
| run: corepack enable && corepack prepare yarn@4.9.2 --activate | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build web | |
| run: yarn web:build | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Add cross-compilation targets (Linux ARM64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build Rust binary (Linux ARM64) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: cd backend && cargo build --release --target ${{ matrix.target }} | |
| env: | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
| - name: Build Rust binary (other targets) | |
| if: matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: cd backend && cargo build --release --target ${{ matrix.target }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: backend/target/${{ matrix.target }}/release/pi-server${{ contains(matrix.artifact, 'windows') && '.exe' || '' }} | |
| build-apk: | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Enable Corepack | |
| run: corepack enable && corepack prepare yarn@4.9.2 --activate | |
| - name: Setup Expo | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EAS_API_TOKEN }} | |
| packager: npm | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Build APK | |
| run: eas build --platform android --profile preview --non-interactive --local | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pi-ui-android | |
| path: '*.apk' | |
| eas-update: | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Enable Corepack | |
| run: corepack enable && corepack prepare yarn@4.9.2 --activate | |
| - name: Setup Expo | |
| uses: expo/expo-github-action@v8 | |
| with: | |
| eas-version: latest | |
| token: ${{ secrets.EAS_API_TOKEN }} | |
| packager: npm | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: EAS Update | |
| run: eas update --auto --non-interactive | |
| upload-release-assets: | |
| needs: [release-please, build, build-apk] | |
| if: needs.release-please.outputs.release_created == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Rename artifacts to include platform | |
| run: | | |
| mkdir -p release-assets | |
| for dir in artifacts/pi-server-*; do | |
| name=$(basename "$dir") | |
| if [[ "$name" == *.exe ]]; then | |
| cp "$dir"/pi-server.exe "release-assets/$name" | |
| else | |
| cp "$dir"/pi-server "release-assets/$name" | |
| fi | |
| done | |
| cp artifacts/pi-ui-android/*.apk release-assets/pi-ui-android.apk | |
| - name: Upload assets to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| files: release-assets/* |