mirror of https://github.com/R2Northstar/Northstar
Add "build-thunderstore-package" job
This commit is contained in:
parent
253d60a578
commit
45d4bc13e2
|
@ -32,7 +32,7 @@ jobs:
|
|||
FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | tr -d '[:alpha:]')
|
||||
sed -i "s/0,0,0,1/${FILEVERSION}/g" LauncherInjector/resources.rc
|
||||
- name: Build
|
||||
working-directory: northstar-launcher
|
||||
working-directory: northstar-launcher
|
||||
run: |
|
||||
cp -r ../discord-plugin/*Discord* .
|
||||
msbuild /p:Configuration=Release R2Northstar.sln
|
||||
|
@ -110,3 +110,66 @@ jobs:
|
|||
with:
|
||||
name: Northstar.release.${{ env.NORTHSTAR_VERSION }}
|
||||
path: northstar
|
||||
|
||||
# todo: add manual trigger
|
||||
# todo: add icons and a proper readme
|
||||
# todo: update mod description
|
||||
build-thunderstore-package:
|
||||
needs: build-northstar # comment out when running locally
|
||||
env:
|
||||
# Release envs, comment this out when running locally
|
||||
TCLI_AUTH_TOKEN: ${{ secrets.THUNDERSTORE_TOKEN }}
|
||||
TS_REPO: https://thunderstore.io/
|
||||
TS_COMMUNITY: northstar
|
||||
|
||||
# Uncomment when testing locally, must be unique
|
||||
# NORTHSTAR_VERSION: 0.1.5
|
||||
|
||||
# Thunderstore info and descriptions
|
||||
TS_NAMESPACE: northstar
|
||||
TS_MOD_NAME: Northstar
|
||||
TS_MOD_DESCRIPTION: Titanfall 2 modding and custom server framework.
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Setup tcli
|
||||
run: |
|
||||
wget https://github.com/thunderstore-io/thunderstore-cli/releases/download/0.1.4/tcli-0.1.4-linux-x64.tar.gz
|
||||
tar xvf tcli-0.1.4-linux-x64.tar.gz
|
||||
mv -v tcli-0.1.4-linux-x64/tcli /bin
|
||||
|
||||
- name: (DEBUG) Download Northstar package
|
||||
if: ${{ env.ACT }} # Download Northstar package when running locally instead of relying on previous jobs
|
||||
run: |
|
||||
wget https://github.com/R2Northstar/Northstar/releases/download/v1.6.3/Northstar.release.v1.6.3.zip
|
||||
unzip Northstar.release.v1.6.3.zip -d northstar
|
||||
|
||||
- name: Download built Northstar package
|
||||
uses: actions/download-artifact@v2
|
||||
if: ${{ !env.ACT }} # Skip this job when running locally
|
||||
with:
|
||||
name: Northstar.release.${{ env.NORTHSTAR_VERSION }}
|
||||
path: northstar
|
||||
|
||||
- name: Make package structure
|
||||
run: |
|
||||
rm northstar/ns_startup*.txt
|
||||
mkdir -p thunderstore/dist/Northstar
|
||||
mv -v northstar/* thunderstore/dist/Northstar
|
||||
|
||||
- name: Setup environment variables
|
||||
run: |
|
||||
echo "MOD_VERSION=$(echo $NORTHSTAR_VERSION | tr -d 'v')" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish package to Thunderstore
|
||||
working-directory: thunderstore
|
||||
run: |
|
||||
tcli init --package-name=$TS_MOD_NAME --package-namespace=$TS_NAMESPACE --package-version $MOD_VERSION
|
||||
|
||||
sed -i "s/communities = \[\]/communities = [\"$TS_COMMUNITY\"]/g" thunderstore.toml
|
||||
sed -i "s/Example-Dependency = \"1.0.0\"//g" thunderstore.toml
|
||||
sed -i "s/description = \"Example mod description\"/description = \"$TS_MOD_DESCRIPTION\"/g" thunderstore.toml
|
||||
cat thunderstore.toml
|
||||
|
||||
echo $TS_MOD_NAME > README.md
|
||||
tcli build
|
||||
tcli publish --repository "$TS_REPO" --file build/*.zip
|
||||
|
|
Loading…
Reference in New Issue