Nightly Build and Publish #734
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: Nightly Build and Publish | |
| on: | |
| schedule: | |
| - cron: '0 5 * * *' # Runs every day at 5AM UTC | |
| workflow_dispatch: | |
| permissions: | |
| packages: write | |
| jobs: | |
| build-and-publish: | |
| name: Build and Publish | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: dev | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build | |
| run: | | |
| git_hash=$(git rev-parse HEAD) | |
| dotnet build Src/GBX.NET -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet build Src/GBX.NET.Tool -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet build Src/GBX.NET.Tool.CLI -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet build Src/GBX.NET.PAK -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet build Src/GBX.NET.ZLib -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet build Src/GBX.NET.Crypto -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| dotnet pack Templates -c Release -p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').c${git_hash::7} | |
| - name: Publish nightly GBX.NET nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.Tool nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET.Tool/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.Tool.CLI nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET.Tool.CLI/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.PAK nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET.PAK/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.ZLib nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET.ZLib/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.Crypto nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Src/GBX.NET.Crypto/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate | |
| - name: Publish nightly GBX.NET.Templates nupkg to nuget.gbx.tools | |
| run: dotnet nuget push Templates/bin/Release/*.nupkg -k ${{ secrets.NUGET_GBXTOOLS_API_KEY }} -s https://nuget.gbx.tools/v3/index.json --skip-duplicate |