generated from Valheim-Modding/JotunnModStub
-
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (49 loc) · 1.94 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Publish package
on:
release:
types: [published] # run when a new release is published
env:
name: ChebsMercenaries
jsonf: manifest.json
dlpath: https://github.com/jpw1991/chebs-mercenaries/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: Get clean version
run: echo "cleanVersion=$(echo ${{github.ref_name}} | sed s/v//g)" >> $GITHUB_ENV
- name: Check that version matches
run: |
if [[ "$(jq -r '.version_number' $(find ./${{env.name}}/Package -name ${{env.jsonf}}))" != "${{ env.cleanVersion }}" ]]; then
echo "::debug::${{env.cleanVersion}}"
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.ref_name }} # This is the tag that was created in the release
description: ${{ env.DESCRIPTION }}
token: ${{ secrets.TS_KEY }}
deps: ${{ env.dependencies }}
categories: ${{ env.categories }}
file: ${{ env.name }}.${{ github.ref_name }}.zip