v0.13.11 #138
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: Create Release 📦 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| package_path: "PlayUR.unitypackage" | |
| jobs: | |
| # build the packages | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '3.1.x' | |
| # Install the packager | |
| - name: Install Unity Packager | |
| run: | | |
| git clone https://github.com/Lachee/Unity-Package-Exporter.git tools/unity-package-exporter | |
| dotnet publish -c Release -o tools tools/unity-package-exporter/UnityPackageExporter | |
| # Pack the assets | |
| - name: Create Package | |
| run: | | |
| echo "Creating package" | |
| dotnet tools/UnityPackageExporter.dll \ | |
| ./ \ | |
| PlayUR.unitypackage \ | |
| --sub-folder "PlayUR" \ | |
| --exclude "tools" \ | |
| --exclude "*~" \ | |
| --exclude ".*" \ | |
| --exclude "*.unitypackage" \ | |
| --skip-dependency-check \ | |
| -r . | |
| # Upload artifact | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "PlayUR Unity Plugin" | |
| path: PlayUR.unitypackage | |
| # Tag the build | |
| tag: | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: Klemensas/action-autotag@stable | |
| id: auto-tag | |
| with: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| tag_prefix: "v" | |
| outputs: | |
| tag: ${{ steps.auto-tag.outputs.tagname }} | |
| # Update the release | |
| release: | |
| permissions: write-all | |
| runs-on: ubuntu-latest | |
| needs: [ build, tag ] | |
| if: ${{ startsWith(needs.tag.outputs.tag, 'v') }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: ${{ needs.tag.outputs.tag }} | |
| prerelease: true | |
| title: Release ${{ needs.tag.outputs.tag }} | |
| files: artifacts/**/*.unitypackage |