Update Unturned Redist for Client Preview #36838
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 Client Preview" | |
| on: | |
| schedule: | |
| - cron: "*/6 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| update_redist: | |
| name: "Run Updater" | |
| runs-on: ubuntu-latest | |
| env: | |
| APP_ID: 304930 | |
| REDIST_DIR: redist/redist-client-preview | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| - name: Download tool release | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: RocketModFix/UnturnedRedistUpdateTool | |
| latest: true | |
| fileName: UnturnedRedistUpdateTool.zip | |
| out-file-path: redist_tool | |
| extract: true | |
| - 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 | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| with: | |
| dotnet-version: 9.x | |
| - name: Run auto-updater (force) | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: dotnet redist_tool/UnturnedRedistUpdateTool.dll "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/$REDIST_DIR" "$APP_ID" --force | |
| - name: Run auto-updater (schedule) | |
| if: ${{ github.event_name == 'schedule' }} | |
| run: dotnet redist_tool/UnturnedRedistUpdateTool.dll "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/$REDIST_DIR" "$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 "sunnamed434@users.noreply.github.com" | |
| git config --global user.name "sunnamed434" | |
| git add -A | |
| git reset README.md # Reset README.md, cause steamcmd override it. | |
| 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 | |