Update Unturned Redist for Server Preview #28939
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Update Unturned Redist for Server Preview" | |
on: | |
schedule: | |
- cron: "*/12 * * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
update_redist: | |
name: "Run Updater" | |
runs-on: ubuntu-latest | |
env: | |
APP_ID: 1110390 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Checkout tools | |
uses: actions/checkout@v4 | |
with: | |
repository: RocketModFix/UnturnedRedistUpdateTool | |
path: tools | |
- name: Setup SteamCMD | |
id: setup-steamcmd | |
uses: CyberAndrii/setup-steamcmd@v1 | |
- name: Update app | |
run: steamcmd +force_install_dir $GITHUB_WORKSPACE +login ${{ secrets.STEAM_USERNAME }} ${{ secrets.STEAM_PASSWORD }} +app_update $APP_ID -beta preview -validate +quit | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.x' | |
- name: Install dependencies | |
run: dotnet restore tools/UnturnedRedistUpdateTool/ | |
- name: Run auto-updater (force) | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: dotnet run --project ./tools/UnturnedRedistUpdateTool/UnturnedRedistUpdateTool.csproj --configuration Release -- $GITHUB_WORKSPACE $GITHUB_WORKSPACE/redist/redist-server-preview $APP_ID --force | |
- name: Run auto-updater (schedule) | |
if: ${{ github.event_name == 'schedule' }} | |
run: dotnet run --project ./tools/UnturnedRedistUpdateTool/UnturnedRedistUpdateTool.csproj --configuration Release -- $GITHUB_WORKSPACE $GITHUB_WORKSPACE/redist/redist-server-preview $APP_ID | |
- name: Generate Commit Message | |
run: | | |
msg=$( cat .commit ) | |
echo "message=$msg" >> "$GITHUB_OUTPUT" | |
id: generate_commit_message | |
- run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "sunnamed434" | |
git add -A | |
git reset README.md # Prevents adding changes to README.md, steamcmd rewrites it by some reason. | |
git status | |
git commit -m "${{ steps.generate_commit_message.outputs.message }}" | |
git push | |
workflow-keepalive: | |
if: github.event_name == 'schedule' | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: liskin/gh-workflow-keepalive@v1 | |