-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.63 KB
/
butler.yaml
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
name: Build Unity Project
on:
push:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Discard uncommitted changes
run: git reset --hard
- name: Install Butler
run: |
curl -LO https://itch.io/butler/installation/linux/installer.sh
chmod +x installer.sh
./installer.sh
- name: Set up Unity
uses: game-ci/unity-builder@v2
with:
unityVersion: 2022.3.27f1
targetPlatform: StandaloneWindows64
- name: Build Unity Project
run: |
unity-builder --projectPath . --buildTarget StandaloneWindows64 --buildName MyGameBuild --outputPath ./build
- name: Zip Build Output
run: |
powershell -Command "Compress-Archive -Path ./build/* -DestinationPath subnauticaib.zip"
- name: Get Latest Tag
id: get_tag
run: |
git fetch --tags
latest_tag=$(git tag --sort=-v:refname | head -n 1)
echo "latest_tag=${latest_tag}" >> $GITHUB_ENV
- name: Increment Version
id: increment_version
run: |
if [[ "${{ env.latest_tag }}" == "" ]]; then
echo "version=1.0.0" >> $GITHUB_ENV
else
version=$(echo "${{ env.latest_tag }}" | awk -F. -v OFS=. '{$NF++;print}')
echo "version=${version}" >> $GITHUB_ENV
fi
- name: Upload to Butler
run: |
butler push subnauticaib.zip pyoneerc1/subnauticaib:latest --userversion ${{ env.version }} --credentials ${{ secrets.BUTLER_CREDENTIALS }}