-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (47 loc) · 2.12 KB
/
publish.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
name: Publish package
on:
push:
tags:
- "*"
env:
name: ${{github.event.repository.name}} # Edit this if the package name differs from the repo name
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get clean version
run: |
echo cleanVersion=$(echo ${{github.ref_name}} | sed s/v//g) >> $GITHUB_ENV
- name: Check that version matches
run: |
if [[ "$(grep -Po "\d+\.\d+\.\d+" $(find ./ -name mod.json))" != "${{ env.cleanVersion }}" ]]; then
echo "::debug::${{env.cleanVersion}}"
echo "::debug::$(cat $(find ./ -name mod.json ))"
echo "::error::Version in mod.json does not match tag version"
exit 1
fi
publish:
runs-on: ubuntu-latest
needs: verify
steps:
- uses: actions/checkout@v4
- name: Upload Thunderstore Package
uses: GreenTF/[email protected]
with:
community: northstar
# Name of the team to publish the mod under
# This should be modified if your github username is different than your team name on Thunderstore
namespace: ${{ github.repository_owner }} # <------ DOUBLE CHECK THIS
# Name of the package
name: ${{ env.name }} # This can be modified if the package name differs from the repo name
# Package version to publish
version: ${{ github.ref_name }} # This is the tag that was created in the release
# Description of the mod
description: Example mod description # <----------- UPDATE THIS
# Thunderstore API token
token: ${{ secrets.TS_KEY }}
# Directory to wrap the contents of the repo in
wrap: mods/${{ github.repository_owner }}.${{ env.name }} # This will wrap your Author.ModName folder in a mods/ folder before publishing
#deps: "[email protected]" # <------------- Uncomment this line to add dependencies to your mod, each sparated by a space
categories: "mods" # <----------------------------- Add more categories as needed, separated by spaces