-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUnturned.Redist.Client-Preview.yaml
More file actions
79 lines (61 loc) · 2.27 KB
/
Unturned.Redist.Client-Preview.yaml
File metadata and controls
79 lines (61 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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
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-client-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-client-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 "sunnamed434@users.noreply.github.com"
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