Repository navigation
Add AirPlay playback diagnostics #228
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: Xcode - Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| name: Build | |
| runs-on: macos-latest | |
| env: | |
| BUILD_TYPE: Release | |
| BUILD_PATH: build | |
| archiveName: MusicBox | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Test | |
| run: | | |
| xcodebuild -project MusicBox.xcodeproj -scheme MusicBox test -configuration Debug CODE_SIGN_IDENTITY="-" DEVELOPMENT_TEAM="" | |
| - name: Build | |
| run: | | |
| SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-8) \ | |
| && xcodebuild -project MusicBox.xcodeproj -scheme MusicBox build -configuration ${{ env.BUILD_TYPE }} CONFIGURATION_BUILD_DIR=$(pwd)/build CODE_SIGN_IDENTITY="-" DEVELOPMENT_TEAM="" ONLY_ACTIVE_ARCH=NO \ | |
| CURRENT_PROJECT_VERSION="${{ github.run_number }}-${SHORT_SHA}" \ | |
| && cp MusicBox/MusicBox.entitlements build/MusicBox.entitlements \ | |
| && cp .github/install.sh build/install.sh \ | |
| && tar czf ${{ env.archiveName }}-dysym.tar.gz -C build . \ | |
| && tar czf ${{ env.archiveName }}.tar.gz -C build MusicBox.app install.sh MusicBox.entitlements | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.archiveName }}-dysym | |
| path: ${{ env.archiveName }}-dysym.tar.gz | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.archiveName }} | |
| path: ${{ env.archiveName }}.tar.gz | |
| - name: Delete current release assets | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: 8Mi-Tech/delete-release-assets-action@main | |
| with: | |
| github_token: ${{ github.token }} | |
| tag: nightly | |
| deleteOnlyFromDrafts: false | |
| continue-on-error: true | |
| - name: Set Build Time | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV | |
| shell: bash | |
| - name: Tag Repo | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: richardsimko/update-tag@v1 | |
| with: | |
| tag_name: nightly | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| continue-on-error: true | |
| - name: Create release notes | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| cat > release.txt << 'EOF' | |
| Release created at ${{ env.BUILDTIME }} | |
| Nightly build from commit ${{ github.sha }} | |
| This is an automated pre-release build. Use at your own risk. | |
| EOF | |
| - name: Update nightly pre-release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: nightly | |
| name: nightly | |
| prerelease: true | |
| body_path: release.txt | |
| files: | | |
| ${{ env.archiveName }}-dysym.tar.gz | |
| ${{ env.archiveName }}.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |