Serilog.Sinks.BepInEx v0.2.0 #5
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: Publish | |
on: | |
release: | |
types: [prereleased, released] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
fetch-depth: 0 | |
filter: tree:0 | |
submodules: recursive | |
- name: Setup .NET environment | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.*" | |
- name: Restore solution | |
run: | | |
dotnet restore | |
dotnet tool restore | |
- name: Build and pack solution | |
run: | | |
dotnet build -c Release | |
dotnet pack -c Release --no-build | |
- name: Upload thunderstore artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: thunderstore-build | |
path: | | |
./*/assets/thunderstore.toml.user | |
./*/bin/Release/*/dist/*.zip | |
- name: Upload nupkg artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nupkg-build | |
path: ./*/bin/Release/*.nupkg | |
upload-release-artifacts: | |
name: Upload Release Artifacts | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
- name: Upload artifacts to Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.event.release.tag_name }} thunderstore-build/*/bin/Release/*/dist/*.zip nupkg-build/*/bin/Release/*.nupkg | |
deploy-nuget: | |
name: Deploy to NuGet | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
- name: Download nupkg artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: nupkg-build | |
- name: Setup .NET environment | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.100" | |
- name: Publish to NuGet.org | |
run: | | |
dotnet nuget push ./*/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_TOKEN }} --source https://api.nuget.org/v3/index.json | |
deploy-thunderstore: | |
name: Deploy to Thunderstore | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
- name: Download Thunderstore artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: thunderstore-build | |
- name: Setup .NET environment | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.100" | |
- name: Restore dotnet tools | |
run: | | |
dotnet tool restore | |
- name: Publish to Thunderstore | |
env: | |
TCLI_AUTH_TOKEN: ${{ secrets.THUNDERSTORE_API_TOKEN }} | |
run: | | |
dotnet build -c Release -target:ThunderstorePublish |