2022-04-30 14:13:16 +01:00
|
|
|
name: Publish Nightly
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-04-03 18:11:26 +01:00
|
|
|
- main
|
2023-04-13 23:27:08 +01:00
|
|
|
workflow_dispatch:
|
2022-04-30 14:13:16 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
nightly:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup .NET
|
2023-03-28 15:02:09 +01:00
|
|
|
uses: actions/setup-dotnet@v3
|
2022-04-30 14:13:16 +01:00
|
|
|
with:
|
2023-11-14 16:49:53 +00:00
|
|
|
dotnet-version: 8.0.x
|
2022-04-30 14:13:16 +01:00
|
|
|
|
|
|
|
- name: Add GitHub NuGet source
|
|
|
|
run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json"
|
|
|
|
|
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
|
|
|
|
|
|
|
- name: Build
|
2023-04-02 21:03:40 +01:00
|
|
|
run: dotnet build --configuration Debug --no-restore -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
|
2022-04-30 14:13:16 +01:00
|
|
|
|
|
|
|
- name: Build NuGet package
|
|
|
|
run: |
|
|
|
|
mkdir build
|
2023-04-02 16:46:34 +01:00
|
|
|
dotnet pack X10D --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
|
|
|
|
dotnet pack X10D.Hosting --configuration Debug --no-build -p:SymbolPackageFormat=snupkg --include-symbols --include-source -o build -p:VersionSuffix='nightly' -p:BuildNumber=${{ github.run_number }}
|
2022-04-30 14:13:16 +01:00
|
|
|
|
|
|
|
- name: Push NuGet Package to GitHub
|
|
|
|
run: dotnet nuget push "build/*" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
|
|
|
|
|
|
|
|
- name: Push NuGet Package to nuget.org
|
|
|
|
run: dotnet nuget push "build/*" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
|
2023-03-29 15:00:00 +01:00
|
|
|
|
2023-04-02 17:25:56 +01:00
|
|
|
- name: Upload build artifacts
|
2023-04-02 15:44:10 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: build
|
|
|
|
path: build/
|