v1.2.1 #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: 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.x" | |
- name: Restore project | |
run: | | |
dotnet restore | |
dotnet tool restore | |
- name: Build solution | |
run: | | |
dotnet build -c Release | |
- name: Upload thunderstore artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: thunderstore-build | |
path: | | |
./*/assets/thunderstore.toml.user | |
./*/bin/Release/netstandard2.1/dist/*.zip | |
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/netstandard2.1/dist/*.zip | |
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.x" | |
- 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 -f netstandard2.1 -target:ThunderstorePublish |