From 9af348c00b7c79b8c6575258050a4a29c5728523 Mon Sep 17 00:00:00 2001 From: "Sky C." Date: Sun, 8 Dec 2024 22:11:11 -0500 Subject: [PATCH] Create release.yml [skip ci] --- .github/workflows/release.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3fa404 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +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