Skip to content

Feature/version upgrade #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3
- uses: wagoid/commitlint-github-action@v5
10 changes: 6 additions & 4 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Nightly Build
permissions:
contents: write
on:
push:
branches:
Expand All @@ -7,11 +9,11 @@ jobs:
deployNightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm install
node-version: 16
- run: HUSKY=0 npm ci
- run: npm run build
- name: Deploy nightly branch
run: sh ./publish-nightly.sh
Expand Down
42 changes: 29 additions & 13 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
name: CI
name: Release

on:
push:
branches:
- main
- master
pull_request:
branches:
- develop
- master

permissions:
contents: read

jobs:
test:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm install
- run: npm run build
node-version: 16
- name: Install dependencies
run: HUSKY=0 npm ci && npm run build
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run semantic-release
run: npm run semantic-release
52 changes: 41 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Uu]ser[Ss]ettings/
CodeCoverage/
UIElementsSchema/

# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Recordings can get excessive in size
/[Rr]ecordings/

/[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
/.vs/
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
Expand All @@ -22,23 +40,35 @@ ExportedObj/
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D Generated File On Crash Reports
sysinfo.txt

# Builds
*.apk
*.aab
*.unitypackage
/Logs/Packages-Update.log
Logs/
CodeCoverage/
*.app

# Crashlytics generated file
crashlytics-build.properties

# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*

# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*

# Node.js
node_modules
dist
dist.zip
UserSettings/
6 changes: 3 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit
npx --no -- commitlint --edit ${1}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.16.0
16.17.0
2 changes: 1 addition & 1 deletion .oyster.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"behavior tree",
"builder pattern"
],
"oysterVersion": "2.1.0",
"oysterVersion": "3.0.2",
"packageName": "com.fluid.behavior-tree",
"packageScope": "com.fluid",
"unityVersion": "2018.1",
Expand Down
18 changes: 6 additions & 12 deletions Assets/Samples/DecoratorRepeatWithWait.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
using CleverCrow.Fluid.BTs.Tasks;
using CleverCrow.Fluid.BTs.Trees;
using UnityEngine;
using Random = UnityEngine.Random;

namespace CleverCrow.Fluid.BTs.Samples {
public class DecoratorRepeatWithWait : MonoBehaviour {
[SerializeField]
private BehaviorTree _tree;

[Tooltip("Setting to success will cause the task to succeed")]
[SerializeField]
private bool _toggle;
private bool _isTaskSuccess;

void Start () {
_tree = new BehaviorTreeBuilder(gameObject)
.RepeatForever()
.Parallel()

.Sequence()
.Do(() => {
_toggle = true;
return TaskStatus.Success;
})
.Do(() => TaskStatus.Success)
.WaitTime()
.Do(() => {
_toggle = false;
return TaskStatus.Success;
})
.Do(() => TaskStatus.Success)
.WaitTime()
.End()

.Sequence()
.Sequence("Repeat until success is checked")
.Do(() => TaskStatus.Success)
.RepeatUntilSuccess()
.Sequence()
.WaitTime()
.Do(() => Random.value > 0.5f ? TaskStatus.Success : TaskStatus.Failure)
.Do(() => _isTaskSuccess ? TaskStatus.Success : TaskStatus.Failure)
.End()
.End()
.End()
Expand Down
22 changes: 11 additions & 11 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"clever-crow.nsubstitute": "2.0.3",
"com.unity.2d.sprite": "1.0.0",
"com.unity.2d.tilemap": "1.0.0",
"com.unity.ads": "3.7.1",
"com.unity.analytics": "3.5.3",
"com.unity.collab-proxy": "1.5.7",
"com.unity.ide.rider": "3.0.6",
"com.unity.ide.visualstudio": "2.0.8",
"com.unity.ide.vscode": "1.2.3",
"com.unity.purchasing": "3.1.0",
"com.unity.test-framework": "1.1.24",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.5.5",
"com.unity.ugui": "1.0.0",
"com.unity.ads": "4.4.2",
"com.unity.ai.navigation": "2.0.4",
"com.unity.analytics": "3.8.1",
"com.unity.collab-proxy": "2.3.1",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.purchasing": "4.11.0",
"com.unity.test-framework": "1.3.9",
"com.unity.timeline": "1.8.7",
"com.unity.ugui": "2.0.0",
"com.unity.modules.accessibility": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
Expand Down
Loading
Loading