SDB Support older .sd2 formats #24
Workflow file for this run
This file contains 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: Build and publish | |
on: | |
push: | |
pull_request: | |
types: [opened, reopened] | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_NOLOGO: true | |
NuGetDirectory: ${{ github.workspace }}/nuget | |
jobs: | |
build: | |
name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { name: Linux, os: ubuntu-22.04 } | |
- { name: Windows VS2022, os: windows-2022 } | |
- { name: MacOS, os: macos-12 } | |
dotnet: | |
- { name: .NET 8, version: '8.0.x' } | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup .NET ${{ matrix.dotnet.version }} SDK | |
id: setup-dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet.version }} | |
- name: Enforce SDK Version | |
run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force | |
- name: Verify SDK Installation | |
run: dotnet --info | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -c Release | |
- name: Create NuGet package | |
run: dotnet pack -c Release FauFau/FauFau.csproj --output ${{ env.NuGetDirectory }} | |
- name: Publish NuGet package as artifact | |
if: ${{ matrix.platform.name == 'Linux' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FauFau.nupkg | |
if-no-files-found: error | |
retention-days: 7 | |
path: ${{ env.NuGetDirectory }}/*.nupkg | |
deploy: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-22.04 | |
needs: [ build ] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: FauFau.nupkg | |
path: ${{ env.NuGetDirectory }} | |
- name: Publish FauFau NuGet | |
run: dotnet nuget push ${{ env.NuGetDirectory }}/*.nupkg --api-key "${{ secrets.TMW_NUGET }}" --source https://api.nuget.org/v3/index.json --skip-duplicate |