Skip to content

Nightly Build and Publish #203

Nightly Build and Publish

Nightly Build and Publish #203

Workflow file for this run

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@v4
with:
ref: dev
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
8.0.x
6.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
git_hash=$(git rev-parse HEAD)
dotnet build Src/GBX.NET -c Release --no-restore /p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').${git_hash::7}
dotnet build Src/GBX.NET.Tool -c Release --no-restore /p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').${git_hash::7}
dotnet build Src/GBX.NET.Tool.CLI -c Release --no-restore /p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').${git_hash::7}
dotnet build Src/GBX.NET.PAK -c Release --no-restore /p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').${git_hash::7}
dotnet build Src/GBX.NET.ZLib -c Release --no-restore /p:ContinuousIntegrationBuild=true --version-suffix nightly.$(date +'%Y%m%d').${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