README Updates #19
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 | |
on: | |
push: | |
branches: [ test ] | |
pull_request: | |
release: | |
types: [released, prereleased] | |
workflow_dispatch: | |
env: | |
TCLI_AUTH_TOKEN: ${{ secrets.TCLI_API_TOKEN }} | |
jobs: | |
build: | |
if: "!startsWith(github.ref, 'refs/tags/latest')" | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: "Build Changelog" | |
uses: mikepenz/release-changelog-builder-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
outputFile: "CHANGELOG.md" | |
includeOpen: true | |
ignorePreReleases: true | |
toTag: ${{ github.ref }} | |
configurationJson: | | |
{ | |
"template": "# ${{ github.event.repository.name }} - ${{ github.ref_name }}\n\n#{{CHANGELOG}}\n\n### Misc\n---\n#{{UNCATEGORIZED}}\n\nFull Changelog: [#{{FROM_TAG}}...#{{TO_TAG}}](#{{RELEASE_DIFF}})", | |
"pr_template": "* #{{TITLE}} by [@#{{AUTHOR}}](https://github.com/#{{AUTHOR}}) in [##{{NUMBER}}](#{{URL}})", | |
"categories": [ | |
{ | |
"title": "## Features", | |
"labels": ["Feature"] | |
}, | |
{ | |
"title": "## Fixes", | |
"labels": ["Fix"] | |
}, | |
{ | |
"title": "## Documentation", | |
"labels": ["Documentation"] | |
} | |
] | |
} | |
- name: Set IS_RELEASE environment variable | |
if: github.event_name == 'release' && github.event.release.prerelease == false | |
run: echo "IS_RELEASE=true" >> $GITHUB_ENV | |
- name: Setup .NET Env | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.203" | |
- name: Restore Solution | |
run: | | |
dotnet restore | |
dotnet tool restore | |
- name: Pack Solution | |
run: | | |
dotnet pack --configuration Release | |
- name: Upload Thunderstore Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: thunderstore-build | |
path: ./*.zip | |
upload-release-artifacts: | |
if: github.event.release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- 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/*.zip |