52 move UI to ow repos (#124) #40
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: Publish Core | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: windows-latest # Use Windows to support .NET SDK easily | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.0.x' # TODO: Create variable out of this | |
| # TODO: Quality gates (Unit tests, sonar cloud?) | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build project | |
| run: dotnet build --configuration Release --no-restore | |
| # TODO: Create installer for launcher and editor bundle | |
| - name: Pack NuGet package | |
| run: dotnet pack --configuration Release --no-build --output Core/bin/Release/ | |
| - name: Publish to NuGet | |
| run: dotnet nuget push "Core/bin/Release/SharpEngine.Core.NET.1.0.0.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.PUBLISH_NUGET_PACKAGE }} --skip-duplicate | |
| # TODO: Publish the NuGet package to GitHub. | |
| - name: Create GitHub Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PUBLISH_REPO_PACKAGE }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: Release ${{ github.ref }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload NuGet package to GitHub Release | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PUBLISH_REPO_PACKAGE }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: Core/bin/Release/SharpEngine.Core.NET.1.0.0.nupkg | |
| asset_name: SharpEngine.Core.NET.1.0.0.nupkg | |
| asset_content_type: application/zip |