CD #2
Workflow file for this run
This file contains hidden or 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: CD | |
| on: | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| upload-asset: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8" | |
| - uses: nuget/setup-nuget@v2 | |
| with: | |
| nuget-api-key: ${{ secrets.NUGET_API_KEY }} | |
| - name: Restore | |
| run: | | |
| dotnet restore | |
| - name: Build | |
| run: | | |
| dotnet build -c Release | |
| - name: Package | |
| run: | | |
| dotnet tool install -g tcli | |
| tcli build | |
| - name: Upload mod file to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| file: build/*.* | |
| tag: "${{ github.ref }}" | |
| overwrite: true | |
| - name: Upload mod file to Thunderstore | |
| env: | |
| TCLI_AUTH_TOKEN: "${{ secrets.TCLI_AUTH_TOKEN }}" | |
| run: | | |
| tcli publish | |
| - name: Upload mod file to NuGet | |
| run: | | |
| nuget push bin/Release/COTL_API/*.nupkg |