Skip to content

Commit

Permalink
test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pyoneerC committed Sep 23, 2024
1 parent 400f41a commit 3f99e2f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/butler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build Unity Project

on:
push:
branches:
- main

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- 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 }}

0 comments on commit 3f99e2f

Please sign in to comment.