Skip to content

Commit 2d7e6d6

Browse files
committed
Initial commit
0 parents  commit 2d7e6d6

35 files changed

+1059
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Unity (please complete the following information):**
27+
- Version: [e.g. 2020.3.29f1]
28+
- TestMode: [e.g. Editor, playmode]
29+
30+
**Desktop (please complete the following information):**
31+
- OS: [e.g. iOS]
32+
- Browser [e.g. chrome, safari]
33+
- Version [e.g. 22]
34+
35+
**Smartphone (please complete the following information):**
36+
- Device: [e.g. iPhone6]
37+
- OS: [e.g. iOS8.1]
38+
- Browser [e.g. stock browser, safari]
39+
- Version [e.g. 22]
40+
41+
**Additional context**
42+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Pull Request
3+
about: Create a pull request
4+
title: ''
5+
assignees:
6+
7+
---
8+
9+
**NOTE: Create a pull request to merge into `develop` branch**

.github/workflows/Release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release ▶️
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
persist-credentials: false
15+
16+
- uses: cycjimmy/semantic-release-action@v3
17+
id: semantic # Need an `id` for output variables
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
extra_plugins: |
22+
@semantic-release/changelog
23+
@semantic-release/git
24+
25+
- name: Log version on published
26+
if: steps.semantic.outputs.new_release_published == 'true'
27+
run: |
28+
echo Version: ${{ steps.semantic.outputs.new_release_version }}
29+
echo Major: ${{ steps.semantic.outputs.new_release_major_version }}
30+
echo Minor: ${{ steps.semantic.outputs.new_release_minor_version }}
31+
echo Patch: ${{ steps.semantic.outputs.new_release_patch_version }}

.github/workflows/setup.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Setup package 📝
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
Setup:
10+
runs-on: ubuntu-latest
11+
12+
env:
13+
# This need to respect the Unity nomenclature (see : https://docs.unity3d.com/Manual/cus-naming.html)
14+
# Previous name (back slash to include special character):
15+
PrevAuthorNameField: \[YourAuthorName\]
16+
PrevCompanyNameField: \[YourCompany\]
17+
PrevPackageNameField: \[YourPackageName\]
18+
PrevGitURLField: \[YourHTTPSGit\]
19+
PrevPackageDisplayNameField: \[YourPackageDisplayName\]
20+
# Your current settings :
21+
AuthorNameField: ${{github.repository_owner}}
22+
PackageNameField: ${{github.event.repository.name}}
23+
GitURLField: ${{github.server_url}}/${{github.repository}}.git
24+
25+
steps:
26+
###########################
27+
# Checkout #
28+
###########################
29+
- name: Checkout project
30+
uses: actions/checkout@v3
31+
with:
32+
fetch-depth: 0
33+
34+
##########################
35+
# Replace field #
36+
##########################
37+
- name: Replace name
38+
run: |
39+
echo ""
40+
echo "#########################"
41+
echo "# Replace field #"
42+
echo "#########################"
43+
echo ""
44+
echo ""
45+
46+
LowercaseProjectName="$(echo $PackageNameField | sed 's/[A-Z]/-&/g;s/^-//' | tr '[A-Z]' '[a-z]')"
47+
LowercaseCompanyNameField="$(echo $AuthorNameField | sed 's/[A-Z]/-&/g;s/^-//' | tr '[A-Z]' '[a-z]')"
48+
49+
find . -type f -name "*" ! -path "./.github/*" ! -path "./.git/*" ! -name ".gitignore" | while read FILE ; do
50+
sed -i -e "s/$PrevCompanyNameField/$LowercaseCompanyNameField/" -e "s/$PrevPackageNameField/$LowercaseProjectName/" ${FILE}
51+
newfile="$(echo ${FILE} |sed -e "s/$PrevCompanyNameField/$LowercaseCompanyNameField/" -e "s/$PrevPackageNameField/$LowercaseProjectName/")";
52+
if [ "${FILE}" != "${newfile}" ]; then
53+
echo "Rename ${FILE} to ${newfile}"
54+
mv "${FILE}" "${newfile}" ;
55+
fi
56+
done
57+
58+
echo "Set project display name: $PackageNameField"
59+
sed -i "s|$PrevPackageDisplayNameField|$PackageNameField|" package.json
60+
61+
echo "Set author : $AuthorNameField"
62+
sed -i "s|$PrevAuthorNameField|$AuthorNameField|" package.json
63+
64+
if [ "$AuthorNameField" == "OpenSourceUnityPackage" ]; then
65+
sed -i "s| \"url\"\: \"\"| \"url\"\: \"https:\/\/github.com\/OpenSourceUnityPackage\"|" package.json;
66+
fi
67+
68+
echo "Add repository URL: $GitURLField"
69+
sed -i "s|$PrevGitURLField|$GitURLField|" package.json
70+
71+
echo "Replace badge in reamde"
72+
sed -i -e "s/OpenSourceUnityPackage/$AuthorNameField/" -e "s/PackageTemplate/$PackageNameField/" README.md
73+
74+
################################
75+
# Remove setup action #
76+
################################
77+
- name: Remove setup action
78+
run: |
79+
rm .github/workflows/setup.yml
80+
81+
###########################
82+
# Commit #
83+
###########################
84+
- name: Commit files
85+
run: |
86+
git config --local user.email "[email protected]"
87+
git config --local user.name "GitHub Action"
88+
git add .
89+
git commit -m "Add changes"
90+
91+
#########################
92+
# Push #
93+
#########################
94+
- name: Push changes
95+
uses: ad-m/github-push-action@a3fd843e49cd58d296bdd2431c4853569a1b900f #Use specific commit for stability
96+
with:
97+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Based on mob-sakai and YarnSpinnerTool action
2+
# Secrets
3+
# UNITY_LICENSE:
4+
name: Run Tests 🧪
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- develop
11+
#- 'feature/**'
12+
paths:
13+
- 'Editor/**'
14+
- 'Runtime/**'
15+
- 'Samples~/**'
16+
- 'Tests/**'
17+
pull_request:
18+
types:
19+
- opened
20+
- synchronize
21+
workflow_dispatch:
22+
23+
jobs:
24+
buildAndTestForSomePlatforms:
25+
name: Test on ${{ matrix.unityVersion }} for ${{ matrix.targetPlatform }}
26+
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
unityVersion:
31+
- 2018.4.30f1
32+
- 2019.1.14f1
33+
- 2019.2.21f1
34+
- 2019.3.15f1
35+
- 2019.4.16f1
36+
- 2020.1.17f1
37+
- 2020.2.1f1
38+
targetPlatform:
39+
# - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
40+
- StandaloneWindows64 # Build a Windows 64-bit standalone.
41+
# - StandaloneLinux64 # Build a Linux 64-bit standalone.
42+
# - iOS # Build an iOS player.
43+
# - Android # Build an Android player.
44+
# - WebGL # WebGL.
45+
steps:
46+
# Checkout sandbox project
47+
- uses: actions/checkout@v2
48+
with:
49+
ref: sandbox
50+
submodules: true
51+
fetch-depth: 0
52+
53+
# Update package submodule
54+
- name: "Update package submodule"
55+
working-directory: Packages/dev
56+
run: git checkout ${{ github.sha }}
57+
58+
# ???
59+
- uses: actions/cache@v2
60+
with:
61+
path: Library
62+
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
63+
restore-keys: |
64+
Library-${{ matrix.unityVersion }}-
65+
Library-
66+
67+
################################
68+
# Check sample folder #
69+
################################
70+
- name: Check sample folder
71+
run: |
72+
echo ""
73+
echo "##############################"
74+
echo "# Check sample folder #"
75+
echo "##############################"
76+
echo ""
77+
echo ""
78+
if exist Sample.meta then
79+
echo "Sample.meta exist and pollut your environement"
80+
exit 1
81+
fi
82+
83+
if exist ./Sample/ then
84+
echo "Sample.meta exist and pollut your environement"
85+
exit 1
86+
fi
87+
88+
# Run tests
89+
- name: "Run tests"
90+
uses: game-ci/unity-test-runner@main
91+
with:
92+
unityVersion: ${{ matrix.unityVersion }}
93+
# List of parameters here : https://docs.unity3d.com/Manual/CommandLineArguments.html
94+
# assemblyFilters: https://docs.unity3d.com/Packages/[email protected]/manual/UsingCodeCoverage.html
95+
customParameters: -nographics -enableCodeCoverage -coverageOptions assemblyFilters:+TODO_COMPAGNIE_NAME.TODO_PACKAGENAME.*Tests
96+
env:
97+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
98+
99+
# Upload test results
100+
- name: Upload test results
101+
uses: actions/upload-artifact@v2
102+
if: always()
103+
with:
104+
name: Test results (edit + play, ${{ matrix.unityVersion }}-${{ matrix.targetPlatform }}
105+
path: ${{ steps.testRunner.outputs.artifactsPath }}

.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
#
3+
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
4+
#
5+
/[Ll]ibrary/
6+
/[Tt]emp/
7+
/[Oo]bj/
8+
/[Bb]uild/
9+
/[Bb]uilds/
10+
/[Ll]ogs/
11+
/[Mm]emoryCaptures/
12+
13+
# Asset meta data should only be ignored when the corresponding asset is also ignored
14+
!/[Aa]ssets/**/*.meta
15+
16+
# Uncomment this line if you wish to ignore the asset store tools plugin
17+
# /[Aa]ssets/AssetStoreTools*
18+
19+
# Autogenerated Jetbrains Rider plugin
20+
[Aa]ssets/Plugins/Editor/JetBrains*
21+
22+
# Visual Studio cache directory
23+
.vs/
24+
25+
# Visual Studio code cache directory
26+
.vscode/
27+
28+
# Rider cache directory
29+
.idea/
30+
31+
# Gradle cache directory
32+
.gradle/
33+
34+
# Autogenerated VS/MD/Consulo solution and project files
35+
ExportedObj/
36+
.consulo/
37+
*.csproj
38+
*.unityproj
39+
*.sln
40+
*.suo
41+
*.tmp
42+
*.user
43+
*.userprefs
44+
*.pidb
45+
*.booproj
46+
*.svd
47+
*.pdb
48+
*.mdb
49+
*.opendb
50+
*.VC.db
51+
52+
# Unity3D generated meta files
53+
*.pidb.meta
54+
*.pdb.meta
55+
*.mdb.meta
56+
57+
# Unity3D generated file on crash reports
58+
sysinfo.txt
59+
60+
# Builds
61+
*.apk
62+
*.unitypackage
63+
64+
# Crashlytics generated file
65+
crashlytics-build.properties
66+

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

CHANGELOG.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)