diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe76151..842df45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -159,10 +159,47 @@ jobs: tag=${GITHUB_REF#refs/tags/} changlogdate=$(date -d ${{ github.event.head_commit.timestamp }} +"%b-%-d-%Y") changelogid="${tag//./}-${changlogdate,,}" - notes=""$'\n\n'"- [Change log](../../wiki/Changelog#$changelogid)"$'\n'"- [Installation instructions](../../wiki/Installation-(EN)#wiki-wrapper)"$'\n'"- [Check sums](../../wiki/Checksums#wiki-wrapper)" + echo "RVERSION=${tag/v/}" >> $GITHUB_ENV + echo "CHANGELOGID=${changelogid}" >> $GITHUB_ENV + notes=""$'\n\n'"- [Change log](https://github.com/szapp/Ninja/wiki/Changelog#$changelogid)"$'\n'"- [Installation instructions](https://github.com/szapp/Ninja/wiki/Installation-(EN)#wiki-wrapper)"$'\n'"- [Check sums](https://github.com/szapp/Ninja/wiki/Checksums#wiki-wrapper)" gh release create $tag -R ${{ github.repository }} -d --verify-tag --title "Ninja ${tag/v/}" --notes "$notes" build/Ninja-*.exe || echo "::error title=Release failed::Could not draft release for tag $tag" env: GITHUB_TOKEN: ${{ secrets.PAT }} + - name: Prepare Steam workshop upload + if: startsWith(github.ref, 'refs/tags/') + shell: bash + run: | + mkdir -p content/System + cp build/*.dll content/System/ + curl -sLO https://github.com/user-attachments/files/15592985/BugslayerUtilG.zip + unzip BugslayerUtilG.zip -d content/System/ + rm BugslayerUtilG.zip + - name: Update in Gothic 1 Steam workshop + if: startsWith(github.ref, 'refs/tags/') + uses: m00nl1ght-dev/steam-workshop-deploy@v1 + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF }} + path: content + appId: 65540 + publishedFileId: 2786936496 + changeNote: | + Version ${{ env.RVERSION }} + + https://github.com/szapp/Ninja/wiki/Changelog#${{ env.CHANGELOGID }} + - name: Update in Gothic 2 Steam workshop + if: startsWith(github.ref, 'refs/tags/') + uses: m00nl1ght-dev/steam-workshop-deploy@v1 + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF }} + path: content + appId: 39510 + publishedFileId: 2786910489 + changeNote: | + Version ${{ env.RVERSION }} + + https://github.com/szapp/Ninja/wiki/Changelog#${{ env.CHANGELOGID }} cleanup: runs-on: ubuntu-latest