Skip to content

Commit

Permalink
Merge pull request #86 from dojoengine/enable-jobs
Browse files Browse the repository at this point in the history
enable linting
  • Loading branch information
Larkooo authored Jan 1, 2025
2 parents 3bfc322 + b90d8b2 commit 861b775
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 30 deletions.
73 changes: 43 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,33 +101,46 @@ jobs:
- name: Cleanup temporary files
run: rm -rf _temp

# lint:
# name: Run Code Linting
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# # Download Unity editor to get the required assemblies
# - name: Request Unity activation file
# id: getManualLicenseFile
# uses: game-ci/unity-request-activation-file@v2

# - name: Download Unity
# uses: game-ci/unity-builder@v4
# env:
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# with:
# targetPlatform: StandaloneLinux64

# - name: Install dotnet tools
# run: |
# dotnet new tool-manifest
# dotnet tool install JetBrains.ReSharper.GlobalTools

# - name: Run ReSharper CLI inspection
# run: |
# jb inspectcode . --output=inspect-results.xml --severity=WARNING \
# --include="Assets/**/*.cs" \
# --exclude="**/Library/**/*.cs;**/Temp/**/*.cs;**/obj/**/*.cs"
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true

# Git LFS
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}

- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard
# Unity Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-Build-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-Build-
# Build
- name: Build Unity Package
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneLinux64
buildMethod: Editor.Builder.BuildPackage
25 changes: 25 additions & 0 deletions Assets/Editor/Builder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using UnityEditor;

namespace Editor
{
public static class Builder
{
public static void BuildPackage()
{
// Define which assets to include in the package
string[] assets = new string[]
{
"Assets",
"Packages/manifest.json",
"Packages/packages-lock.json"
};

// Build the package
AssetDatabase.ExportPackage(
assets,
"Build/dojo.unitypackage",
ExportPackageOptions.Recurse | ExportPackageOptions.IncludeDependencies
);
}
}
}

0 comments on commit 861b775

Please sign in to comment.