Skip to content

Commit

Permalink
Remove unity proj
Browse files Browse the repository at this point in the history
  • Loading branch information
hadashiA committed Feb 15, 2024
1 parent 2d35d94 commit 25b84b0
Show file tree
Hide file tree
Showing 108 changed files with 7 additions and 9,471 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,3 @@ jobs:
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
- run: dotnet build ObservableCollection.WithoutSandbox.slnf -c Debug
- run: dotnet test ObservableCollection.WithoutSandbox.slnf -c Debug --no-build

build-unity:
if: "((github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:'))"
strategy:
matrix:
unity: ["2019.4.25f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
# Execute scripts: Export Package
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
- name: Build Unity (.unitypacakge)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: src/ObservableCollections.Unity
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: PackageExporter.Export

- uses: Cysharp/Actions/.github/actions/check-metas@main # check meta files
with:
directory: src/ObservableCollections.Unity

# Store artifacts.
- uses: actions/upload-artifact@v2
with:
name: ObservableCollections.unitypackage-${{ matrix.unity }}.zip
path: ./src/ObservableCollections.Unity/*.unitypackage
61 changes: 3 additions & 58 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,11 @@ on:
type: boolean

jobs:
update-packagejson:
uses: Cysharp/Actions/.github/workflows/update-packagejson.yaml@main
with:
file-path: ./src/ObservableCollections.Unity/Assets/Plugins/ObservableCollections/package.json
tag: ${{ inputs.tag }}
dry-run: ${{ inputs.dry-run }}

build-dotnet:
needs: [update-packagejson]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: echo ${{ needs.update-packagejson.outputs.sha }}
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
# build and pack
- run: dotnet build ObservableCollection.WithoutSandbox.slnf -c Release -p:Version=${{ inputs.tag }}
Expand All @@ -40,58 +29,14 @@ jobs:
name: nuget
path: ./publish/

build-unity:
needs: [update-packagejson]
strategy:
matrix:
unity: ["2019.4.25f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- run: echo ${{ needs.update-packagejson.outputs.sha }}
- uses: actions/checkout@v3
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
# Execute scripts: Export Package
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
- name: Build Unity (.unitypacakge)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
with:
projectPath: src/ObservableCollections.Unity
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: PackageExporter.Export

- uses: Cysharp/Actions/.github/actions/check-metas@main # check meta files
with:
directory: src/ObservableCollections.Unity

# Store artifacts.
- uses: actions/upload-artifact@v2
with:
name: ObservableCollections.${{ inputs.tag }}.unitypackage
path: ./src/ObservableCollections.Unity/ObservableCollections.${{ inputs.tag }}.unitypackage

# release
create-release:
needs: [update-packagejson, build-unity]
needs: [build-dotnet]
uses: Cysharp/Actions/.github/workflows/create-release.yaml@main
with:
commit-id: ${{ needs.update-packagejson.outputs.sha }}
commit-id: ${{ github.sha }}
dry-run: ${{ inputs.dry-run }}
tag: ${{ inputs.tag }}
nuget-push: true
release-upload: true
release-asset-path: ./ObservableCollections.${{ inputs.tag }}.unitypackage/ObservableCollections.${{ inputs.tag }}.unitypackage
release-upload: false
secrets: inherit

cleanup:
if: ${{ needs.update-packagejson.outputs.is-branch-created == 'true' }}
needs: [update-packagejson, build-unity]
uses: Cysharp/Actions/.github/workflows/clean-packagejson-branch.yaml@main
with:
branch: ${{ needs.update-packagejson.outputs.branch-name }}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ protected override void OnClosed(EventArgs e)
Unity
---

In Unity projects, you can installing `ObservableCollections` with [NugetForUnity](https://github.com/GlitchEnzo/NuGetForUnity).


In Unity, ObservableCollections and Views are useful as CollectionManagers, since they need to convert T to Prefab for display.

Since we need to have side effects on GameObjects, we will prepare a filter and apply an action on changes.
Expand Down
8 changes: 0 additions & 8 deletions src/ObservableCollections.Unity/Assets/Editor.meta

This file was deleted.

78 changes: 0 additions & 78 deletions src/ObservableCollections.Unity/Assets/Editor/PackageExporter.cs

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions src/ObservableCollections.Unity/Assets/Plugins.meta

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 25b84b0

Please sign in to comment.