Skip to content

Commit

Permalink
Create build-unity-package
Browse files Browse the repository at this point in the history
  • Loading branch information
ChryssaAliferi authored Nov 23, 2024
1 parent 8684697 commit a0531b3
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-unity-package
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build UnityPackage

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-unitypackage:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
- run: |
echo "Assets/RudderStack.meta" > metaList
find Assets/RudderStack/ -name \*.meta >> metaList


# Step 2: Set up Unity
uses: game-ci/unity-actions/setup@v2
with:
unityVersion: 2022.3.16f1

# Step 3: Run Unity in batch mode to export the package
- name: Build .unitypackage
run: |
/opt/unity/Editor/Unity \
-batchmode \
-nographics \
-quit \
-projectPath ./ \
-executeMethod PackageExporter.ExportPackage

# Step 4: Upload the built package as an artifact
- name: Upload .unitypackage
uses: actions/upload-artifact@v3
with:
name: RudderStackUnityPackage
path: Builds/RudderStackUnity.unitypackage

0 comments on commit a0531b3

Please sign in to comment.