Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
required: true
description: The tag to release.
type: string
jobs:
release_on_thunderstore:
env:
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: "5.x"
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
with:
additionalArguments: '/overrideconfig "mode=Mainline"'
- name: Download Release
run: gh release download ${{ env.RELEASE_TAG }} -D ./dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install tcli
run: dotnet tool install --global tcli
- name: Run tcli
run: tcli publish --token ${{ secrets.THUNDERSTORE_KEY }} --package-version ${RELEASE_TAG:1}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.0
with:
path: ./build