Added singleton interface #60
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: | |
| - master | |
| env: | |
| package_path: "lachee-utilities.unitypackage" | |
| jobs: | |
| # build the packages | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature: | |
| - name: All Utilities ( complete set ) | |
| package: lachee-utilities-complete.unitypackage | |
| assets: [ "**/*.cs"] | |
| exclude: [ "Documentation", "tools", ".*" ] | |
| - name: Auto Attribute | |
| package: lachee-utilities-only-auto-attributes.unitypackage | |
| assets: [ "Runtime/Attributes/**/AutoAttribute*.cs", "Editor/Attributes/**/AutoAttribute*.cs" ] | |
| exclude: [ ] | |
| - name: Singletons | |
| package: lachee-utilities-only-singletons.unitypackage | |
| assets: [ "Runtime/Utilities/Singleton.cs" ] | |
| exclude: [ ] | |
| - name: Auto Namespace | |
| package: lachee-utilities-only-auto-namespace.unitypackage | |
| assets: [ "Editor/Tools/Namespace*.cs", "Editor/Icons/Namespace*.png", "Editor/Tools/EOLConversion.cs" ] | |
| - name: End Of Line Converter | |
| package: lachee-utilities-only-eol-converter.unitypackage | |
| assets: [ "Editor/Tools/EOLConversion.cs" ] | |
| exclude: [ ] | |
| - name: UYAML | |
| package: lachee-utilities-uyaml.unitypackage | |
| assets: [ "Runtime/UYAML/*.cs" ] | |
| exclude: [ ] | |
| 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: Package ${{matrix.feature.name}} | |
| run: | | |
| echo "Creating package ${{matrix.feature.name}} at ${{matrix.feature.package}}" | |
| dotnet tools/UnityPackageExporter.dll \ | |
| ./ \ | |
| ${{matrix.feature.package}} \ | |
| --sub-folder "Lachee/Utilities" \ | |
| --exclude "${{ join(matrix.feature.exclude, '" --exclude "')}}" \ | |
| --assets "${{ join(matrix.feature.assets, '" --assets "')}}" \ | |
| --assets "Editor/Tools/HelpContext.cs" \ | |
| -r . | |
| # Upload artifact | |
| - name: Upload Artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: ${{matrix.feature.name}} | |
| path: ${{matrix.feature.package}} | |
| # Tag the build | |
| tag: | |
| 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: | |
| runs-on: ubuntu-latest | |
| needs: [ build, tag ] | |
| if: ${{ startsWith(needs.tag.outputs.tag, 'v') }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/download-artifact@v3 | |
| 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 |