Skip to content

Commit

Permalink
Adjust build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
szapp committed Jun 5, 2024
1 parent 904d093 commit 753b165
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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="<!-- <div align=\"center\"><table width=\"100%\"><td><b>&#x26A0; &nbsp; This version is outdated. Please use the <a href=\"https://github.com/szapp/Ninja/releases/latest\">lastest version</a> instead. &#x26A0; </b></td></table></div> -->"$'\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="<!-- <div align=\"center\"><table width=\"100%\"><td><b>&#x26A0; &nbsp; This version is outdated. Please use the <a href=\"https://github.com/szapp/Ninja/releases/latest\">lastest version</a> instead. &#x26A0; </b></td></table></div> -->"$'\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
Expand Down

0 comments on commit 753b165

Please sign in to comment.