diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 585e134..a3e5800 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,6 @@ name: Release on: - release: - types: [published] workflow_dispatch: jobs: @@ -31,35 +29,17 @@ jobs: run: echo "RELEASE_TAG=${{ env.latest_tag }}" >> $GITHUB_ENV - name: Download Release - run: gh release download ${{ env.RELEASE_TAG }} -D ./dist + run: | + gh release download ${{ env.RELEASE_TAG }} -D ./dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install Thunderstore CLI (tcli) run: dotnet tool install --global tcli - - - name: Extract Namespace from thunderstore.toml - id: extract_namespace - run: | - namespace=$(grep 'team =' thunderstore.toml | sed 's/team = "\(.*\)"/\1/') - echo "namespace=$namespace" >> $GITHUB_ENV - shell: bash - - - name: Extract Package Name from manifest.json - id: extract_package_name - run: | - name=$(jq -r .name manifest.json) - echo "name=$name" >> $GITHUB_ENV - shell: bash - - - name: Prepare Thunderstore Package - run: | - version=${{ env.RELEASE_TAG:1 }} - mkdir -p ./dist/package - cp Eclipse.dll manifest.json CHANGELOG.md README.md icon.png ./dist/package/ - cd ./dist/package - zip -r ../zfolmt-Eclipse-$version.zip . - shell: bash - name: Publish build to Thunderstore - run: tcli publish --token ${{ secrets.THUNDERSTORE_KEY }} --package-version ${{ env.RELEASE_TAG:1 }} --team ${{ env.namespace }} --package ${{ env.name }} --config ./dist/thunderstore.toml + run: | + trimmed_tag=${RELEASE_TAG:1} + tcli publish --token ${{ secrets.THUNDERSTORE_KEY }} --package-version $trimmed_tag + env: + RELEASE_TAG: ${{ env.RELEASE_TAG }}