Skip to content

LethalLib-0.14.4

LethalLib-0.14.4 #13

Workflow file for this run

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
- name: Setup .NET environment
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.100"
- name: Restore project
run: |
dotnet restore
dotnet tool restore
- name: Build and pack solution
run: |
dotnet pack -c Release
- name: Upload Thunderstore artifact
uses: actions/upload-artifact@v4
with:
name: thunderstore-build
path: ./*/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/*/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@v3
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@v3
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 -target:PublishThunderstore