Release #13
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: | |
| workflow_dispatch: | |
| inputs: | |
| changelog: | |
| description: 'Changelog for this release' | |
| required: true | |
| default: 'Minor updates and fixes' | |
| version: | |
| description: 'Version tag (e.g. v1.0.0)' | |
| required: true | |
| default: 'v1.0.0' | |
| jobs: | |
| desktop: | |
| name: Desktop ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel, ubuntu-24.04-arm] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install Dependencies (Linux) | |
| if: contains(matrix.os, 'ubuntu') | |
| run: sudo apt-get install -y libgles2-mesa-dev | |
| - name: Build Desktop | |
| run: python3 scripts/build.py desktop | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: live2d-desktop-${{ matrix.os }} | |
| path: out/*.jar | |
| android: | |
| name: Android Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Setup Android NDK | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: r26b | |
| - name: Build Android | |
| run: python3 scripts/build.py android | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: live2d-android | |
| path: out/*.jar | |
| publish: | |
| needs: [desktop, android] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: all-jars | |
| - name: Prepare Release Assets | |
| run: | | |
| mkdir assets | |
| find all-jars -name "*.jar" -exec cp {} assets/ \; | |
| ls -R assets | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event.inputs.version }} | |
| name: Release ${{ github.event.inputs.version }} | |
| body: ${{ github.event.inputs.changelog }} | |
| files: assets/*.jar | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |