diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2d3557b..76fed83 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -18,16 +18,22 @@ jobs: files: vanilla-plus/ dest: modpack.zip - - name: Get modpack name + - name: Extract version from package.json + uses: sergeysova/jq-action@v2 + id: extract_modpack_name + with: + cmd: 'jq .name vanilla-plus/base-pack/manifest.json -r' + + - name: Save modpack name in github output id: get_modpack_name - run: scripts/extract_modpack_name.sh + run: echo "name=${{ steps.extract_modpack_name.outputs.value }}" >> $GITHUB_OUTPUT - uses: GreenTF/upload-thunderstore-package@v4.2 with: namespace: Beeheim # the thunderstore 'team' to publish under description: ${{ github.event.release.body }} token: ${{ secrets.THUNDERSTORE_TOKEN }} - name: ${{ steps.get_modpack_name.outputs.Name }} # the name of the package + name: ${{ steps.get_modpack_name.outputs.name }} # the name of the package version: ${{ github.ref_name }} # Use the tag as the package version community: Valheim # the game the package is for repo: valheim.thunderstore.io diff --git a/scripts/extract_modpack_name.sh b/scripts/extract_modpack_name.sh deleted file mode 100644 index 2fafe17..0000000 --- a/scripts/extract_modpack_name.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Check if a file path is provided -if [ $# -eq 0 ]; then - echo "No file path provided" - exit 1 -fi - -# Check if the file exists -if [ ! -f $1 ]; then - echo "File not found" - exit 1 -fi - -# Extract the name property -name=$(jq -r '.name' $1) -echo "$name" \ No newline at end of file