diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index d2bd67c..2bee9c8 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -64,4 +64,28 @@ jobs: upload_url: ${{ needs.get-release.outputs.upload_url }} asset_path: ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg asset_name: OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip + publish-game-lib: + runs-on: ubuntu-latest + needs: [ get-release ] + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Update Project Version + run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}" + - name: Publish Nuget Package + run: dotnet nuget push ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json --skip-duplicate + - name: Upload assets to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }} + with: + upload_url: ${{ needs.get-release.outputs.upload_url }} + asset_path: ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg + asset_name: OmegaLeo.HelperLib.Game.${{ github.event.release.tag_name }}.nupkg + asset_content_type: application/zip