Skip to content

4.5.2

4.5.2 #28

Workflow file for this run

name: Publish package
on:
release:
types: [published] # run when a new release is published
env:
name: ChebsNecromancy
jsonf: manifest.json
dlpath: https://github.com/jpw1991/chebs-necromancy/releases/download
dependencies: "ValheimModding-Jotunn@2.11.2" # dependencies separated by spaces
categories: "Mods" # categories separated by spaces
namespace: ChebGonaz
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check that version matches
run: |
if [[ "$(jq -r '.version_number' $(find ./${{env.name}}/Package -name ${{env.jsonf}}))" != "${{github.event.release.tag_name}}" ]]; then
echo "::debug::${{github.event.release.tag_name}}"
echo "::debug::$(cat $(find ./ -name ${{env.jsonf}}))"
echo "::error::Version in ${{env.jsonf}} does not match tag version"
exit 1
fi
- name: Get Description
id: get_description
run: |
description=$(jq -r '.description' $(find ./${{env.name}}/Package -name ${{env.jsonf}}))
echo "DESCRIPTION=${description}" >> $GITHUB_ENV
publish:
runs-on: ubuntu-latest
needs: verify
steps:
- uses: actions/checkout@v3
- run: wget ${{env.dlpath}}/${{github.ref_name}}/${{env.name}}.${{github.ref_name}}.zip
- name: Upload Thunderstore Package
uses: GreenTF/upload-thunderstore-package@v4
with:
community: valheim
namespace: ${{env.namespace}}
name: ${{env.name}}
version: ${{github.event.release.tag_name}}
description: ${{env.DESCRIPTION}}
token: ${{secrets.TS_KEY}}
deps: ${{env.dependencies}}
categories: ${{env.categories}}
file: ${{env.name}}.${{github.event.release.tag_name}}.zip