diff --git a/.github/workflows/github-publish.yml b/.github/workflows/github-publish.yml new file mode 100644 index 0000000..78ba36d --- /dev/null +++ b/.github/workflows/github-publish.yml @@ -0,0 +1,77 @@ +name: Publish to GitHub Packages +on: + workflow_dispatch: + inputs: + tag_name: + description: 'Version tag (e.g., 1.0.0)' + required: true + type: string +run-name: "Publish version v${{ inputs.tag_name }} to GitHub Packages" +permissions: + contents: read + packages: write +jobs: + publish-helper-lib: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" -c Release /p:Version=${{ inputs.tag_name }} + - name: Publish to GitHub Packages + run: dotnet nuget push ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate + + publish-changelog-lib: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" -c Release /p:Version=${{ inputs.tag_name }} + - name: Publish to GitHub Packages + run: dotnet nuget push ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate + + publish-game-lib: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib.Game/OmegaLeo.HelperLib.Game.csproj" -c Release /p:Version=${{ inputs.tag_name }} + - name: Publish to GitHub Packages + run: dotnet nuget push ./OmegaLeo.HelperLib.Game/bin/Release/OmegaLeo.HelperLib.Game.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate + + publish-doc-lib: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib.Documentation/OmegaLeo.HelperLib.Documentation.csproj" -c Release /p:Version=${{ inputs.tag_name }} + - name: Publish to GitHub Packages + run: dotnet nuget push ./OmegaLeo.HelperLib.Documentation/bin/Release/OmegaLeo.HelperLib.Documentation.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate + + publish-shared-lib: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .Net Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '8.0.x' + - name: Create Nuget Package + run: dotnet pack "./OmegaLeo.HelperLib.Shared/OmegaLeo.HelperLib.Shared.csproj" -c Release /p:Version=${{ inputs.tag_name }} + - name: Publish to GitHub Packages + run: dotnet nuget push ./OmegaLeo.HelperLib.Shared/bin/Release/OmegaLeo.HelperLib.Shared.${{ inputs.tag_name }}.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/omegaleo/index.json --skip-duplicate diff --git a/OmegaLeo.HelperLib.sln b/OmegaLeo.HelperLib.sln index 6c9ee2f..632cbd4 100755 --- a/OmegaLeo.HelperLib.sln +++ b/OmegaLeo.HelperLib.sln @@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{750F .github\workflows\changelog.yml = .github\workflows\changelog.yml .github\workflows\dotnet.yml = .github\workflows\dotnet.yml .github\workflows\nuget-publish.yml = .github\workflows\nuget-publish.yml + .github\workflows\github-publish.yml = .github\workflows\github-publish.yml EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OmegaLeo.HelperLib.Documentation", "OmegaLeo.HelperLib.Documentation\OmegaLeo.HelperLib.Documentation.csproj", "{AE69480D-5956-46CB-9028-E4723735E37E}"