release #91
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: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| workflow_dispatch: | |
| jobs: | |
| examples: | |
| name: examples on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build | |
| shell: bash | |
| run: python build.py --examples | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: examples-${{ matrix.os }} | |
| path: build/**/bin/examples/**/*_demo* | |
| unity: | |
| name: unity on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: nttld/setup-ndk@v1 | |
| id: setup-ndk | |
| with: | |
| ndk-version: r26d | |
| - uses: seanmiddleditch/gha-setup-ninja@master | |
| - name: build | |
| shell: bash | |
| run: python build.py --android --unity | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: unity-${{ matrix.os }} | |
| path: platforms/unity/Assets/BarelyMusician/Plugins | |
| deploy: | |
| name: artifacts | |
| needs: [examples, unity] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: temp | |
| - name: examples | |
| shell: bash | |
| run: | | |
| mkdir -p artifacts/examples | |
| for dir in temp/examples-*/; do | |
| for platform_dir in "${dir}"*/; do | |
| platform=$(basename "${platform_dir}") | |
| mkdir -p artifacts/examples/${platform} | |
| find "${platform_dir}"* -type f -name '*_demo*' \ | |
| -exec cp {} "artifacts/examples/${platform}/" \; | |
| done | |
| done | |
| - name: unity | |
| shell: bash | |
| run: | | |
| mkdir -p artifacts/unity | |
| for dir in temp/unity-*/; do | |
| cp -rf "${dir}"* platforms/unity/Assets/BarelyMusician/Plugins/ | |
| done | |
| cd platforms/unity | |
| find Assets/ -name \*.meta >> meta | |
| - uses: pCYSl5EDgo/create-unitypackage@master | |
| with: | |
| package-path: ${{ github.workspace }}/artifacts/unity/barelymusician.unitypackage | |
| include-files: platforms/unity/meta | |
| project-folder: platforms/unity | |
| working-folder: ${{ github.workspace }} | |
| - uses: actions/upload-artifact@master | |
| with: | |
| name: artifacts-${{ github.sha }} | |
| path: artifacts | |