-
Notifications
You must be signed in to change notification settings - Fork 15
66 lines (66 loc) · 2.43 KB
/
WorkshopPublish.yml
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
on:
workflow_call:
inputs:
workshop-id:
required: true
type: string
secrets:
STEAM_USERNAME:
required: true
STEAM_PASSWORD:
required: true
jobs:
Workshop-Update:
name: Workshop Update
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
STEAM_TFASEED : ${{ secrets.STEAM_TFASEED }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch .NET 8
run: |
sudo apt update
sudo apt install dotnet8
- name: Fetch DepotDownloader
run: |
wget https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.7.4/DepotDownloader-linux-x64.zip
unzip DepotDownloader-linux-x64.zip -d tools
- name: Fetch GMAD
run: |
echo "bin/gmad_linux" > gmad_files.txt
chmod +x ./tools/DepotDownloader
./tools/DepotDownloader -app 4020 -depot 4023 -filelist gmad_files.txt -dir gmod
chmod +x ./gmod/bin/gmad_linux
- name: Prepare package
run: |
./CI/PreparePackage.sh
- name: Patch Workshop Info
run: |
LAMBDA_VERSION=$(echo "${{ github.ref_name }}" | awk 'match($0, /^([^-]*)\/(.*)$/, a) {print a[2]}');
if [[ -z "$LAMBDA_VERSION" ]]; then
echo "Not a release version, fallback to 'develop'"
LAMBDA_VERSION="develop"
fi
echo -e '\n-- Generated by CI' >> publish/gamemodes/lambda/gamemode/sh_lambda_build.lua
echo -e 'GM.WorkshopID = "${{ inputs.workshop-id }}"' >> publish/gamemodes/lambda/gamemode/sh_lambda_build.lua
echo -e 'GM.WorkshopBuild = true' >> publish/gamemodes/lambda/gamemode/sh_lambda_build.lua
echo -e "GM.Version = \"$LAMBDA_VERSION\"" >> publish/gamemodes/lambda/gamemode/sh_lambda_build.lua
- name: Dump Workshop Info
run: |
cat publish/gamemodes/lambda/gamemode/sh_lambda_build.lua
- name: Create GMA
run: |
mkdir dist
./gmod/bin/gmad_linux create -folder publish -out dist/lambda.gma
- name: Upload to Workshop
uses: ZehMatt/steam-workshop-upload@569de82c2fdf3042af8491379fb698829ba63a9d
with:
appid: 4000
itemid: ${{ inputs.workshop-id }}
changenote: "List of changes: https://github.com/${{ github.repository }}/tree/${{ github.ref_name }}/changelog.md"
path: 'dist'