Skip to content

Commit

Permalink
Add README badges and Steam deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Jun 13, 2024
1 parent 6dc6887 commit 83d7bd1
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 4 deletions.
49 changes: 47 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 2788144857
STEAM_WORKSHOP_G2: 2788144547

permissions:
contents: write

Expand All @@ -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
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
[![Scripts](https://github.com/szapp/Bloodsplats/actions/workflows/scripts.yml/badge.svg)](https://github.com/szapp/Bloodsplats/actions/workflows/scripts.yml)
[![Validation](https://github.com/szapp/Bloodsplats/actions/workflows/validation.yml/badge.svg)](https://github.com/szapp/Bloodsplats/actions/workflows/validation.yml)
[![Build](https://github.com/szapp/Bloodsplats/actions/workflows/build.yml/badge.svg)](https://github.com/szapp/Bloodsplats/actions/workflows/build.yml)
[![GitHub release](https://img.shields.io/github/v/release/szapp/Bloodsplats.svg)](https://github.com/szapp/Bloodsplats/releases/latest)
[![GitHub release](https://img.shields.io/github/v/release/szapp/Bloodsplats.svg)](https://github.com/szapp/Bloodsplats/releases/latest)
[![World of Gothic](https://raw.githubusercontent.com/szapp/patch-template/main/.github/actions/initialization/badges/wog.svg)](https://www.worldofgothic.de/dl/download_615.htm)
[![Spine](https://raw.githubusercontent.com/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=2788144857)
[![Steam Gothic 2](https://img.shields.io/badge/steam-Gothic%202-2a3f5a?logo=steam&labelColor=1b2838)](https://steamcommunity.com/sharedfiles/filedetails/?id=2788144547)

LeGo Bloodsplats for Gothic, Gothic Sequel, Gothic 2, and Gothic 2 NotR.

Expand Down Expand Up @@ -39,7 +43,7 @@ The patch is also available on

<table><thead><tr><th>Gothic</th><th>Gothic Sequel</th><th>Gothic II (Classic)</th><th>Gothic II: NotR</th></tr></thead>
<tbody><tr><td><a href="https://www.worldofgothic.de/dl/download_34.htm">Version 1.08k_mod</a></td><td>Version 1.12f</td><td><a href="https://www.worldofgothic.de/dl/download_278.htm">Report version 1.30.0.0</a></td><td><a href="https://www.worldofgothic.de/dl/download_278.htm">Report version 2.6.0.0</a></td></tr></tbody>
<tbody><tr><td colspan="4" align="center"><a href="https://github.com/szapp/Ninja">Ninja 2.8</a> or higher</td></tr></tbody></table>
<tbody><tr><td colspan="4" align="center"><a href="https://github.com/szapp/Ninja/wiki#wiki-content">Ninja 2.9.15</a> or higher</td></tr></tbody></table>

<!--
Expand Down

0 comments on commit 83d7bd1

Please sign in to comment.