From d5452035806cc399d3ae03ec577ba6c656a97f0e Mon Sep 17 00:00:00 2001 From: pyoneerC Date: Thu, 26 Sep 2024 11:31:58 -0300 Subject: [PATCH] game ci --- .github/workflows/butler.yaml | 44 ----------------------------------- .github/workflows/main.yaml | 43 ++++++++++++++++++++++++++++++++++ .gitignore | 4 ++++ 3 files changed, 47 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/butler.yaml create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/butler.yaml b/.github/workflows/butler.yaml deleted file mode 100644 index d6e0d55..0000000 --- a/.github/workflows/butler.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Build Unity Project - -on: - #push: - #branches: - #- main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Discard uncommitted changes - run: | - git reset --hard - git clean -fd - - - name: Install Butler - run: | - curl -LO https://itch.io/butler/installation/linux/butler - chmod +x butler - sudo mv butler /usr/local/bin/ - - - name: Set up Unity - uses: game-ci/unity-builder@v2 - with: - unityVersion: 2022.3.27f1 - targetPlatform: StandaloneWindows64 - UNITY_LICENSE: ${{ secrets.UNITY_SERIAL }} - - - name: Build Unity Project - run: | - unity-builder --projectPath . --buildTarget StandaloneWindows64 --buildName MyGameBuild --outputPath ./build - - - name: Zip Build Output - run: | - zip -r subnauticaib.zip ./build/* # Use zip command for Linux - - - name: Upload to Butler - run: | - butler push subnauticaib.zip pyoneerc1/subnauticaib:latest --credentials ${{ secrets.BUTLER_CREDENTIALS }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..c33f1dc --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,43 @@ +name: Build Unity Project + +on: + #push: + #branches: + #- main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4.2.0 + + - name: Discard uncommitted changes + run: | + git reset --hard + git clean -fd + + - name: Build Unity Project + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + targetPlatform: StandaloneWindows64 + buildName: SubnauticaIBWindows + buildsPath: ./build + + - name: Zip Build Output + run: | + zip -r SubnauticaIB.zip ./build/* + + - name: Upload to Butler + uses: yeslayla/butler-publish-itchio-action@v1.0.3 + env: + BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} + CHANNEL: windows + ITCH_GAME: subnauticaib + ITCH_USER: pyoneerc1 + PACKAGE: SubnauticaIB.zip diff --git a/.gitignore b/.gitignore index 66252ee..55bfb08 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,10 @@ Desktop.ini .vs/ *.code-workspace +# Ignore temporaries from GameCI +/[Aa]rtifacts/ +/[Cc]odeCoverage/ + # Rider .idea/ *.sln.iml