Skip to content

Commit be73f20

Browse files
authored
Merge pull request #7 from mygamedevtools/refactor/project-structure
Refactor project structure
2 parents 543489e + f2c2982 commit be73f20

File tree

97 files changed

+3689
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3689
-68
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release:
8+
name: release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
persist-credentials: false
15+
- name: Semantic Release
16+
id: semantic
17+
uses: cycjimmy/semantic-release-action@v3.1.2
18+
with:
19+
extra_plugins: |
20+
@semantic-release/changelog
21+
@semantic-release/git
22+
branch: main
23+
env:
24+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
25+
- name: Post Release Checkout
26+
id: post_release
27+
uses: actions/checkout@v3
28+
if: steps.semantic.outputs.new_release_published == 'true'
29+
with:
30+
ref: ${{ steps.semantic.outputs.new_release_version }}
31+
- name: Split UPM Branch
32+
id: split_upm
33+
if: steps.post_release.outcome == 'success'
34+
run: |
35+
git branch -d upm &> /dev/null || echo upm branch not found
36+
git subtree split -P "$PKG_ROOT" -b upm
37+
git checkout upm
38+
if [[ -d "Samples" ]]; then
39+
git mv Samples Samples~
40+
rm -f Samples.meta
41+
git config --global user.name 'github-bot'
42+
git config --global user.email 'github-bot@users.noreply.github.com'
43+
git commit -am "fix: Samples => Samples~"
44+
fi
45+
git push -f -u origin upm
46+
env:
47+
PKG_ROOT: Packages/mygamedevtools-extensions
48+
- name: Create UPM Tag
49+
if: steps.split_upm.outcome == 'success'
50+
run: |
51+
git tag $TAG upm
52+
git push origin --tags
53+
env:
54+
TAG: upm/${{ steps.semantic.outputs.new_release_version }}

.github/workflows/test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Test in ${{ matrix.testMode }}
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
project-path:
19+
- ./
20+
testMode:
21+
- playmode
22+
steps:
23+
- uses: actions/checkout@v3
24+
with:
25+
lfs: true
26+
- uses: actions/cache@v3
27+
with:
28+
path: ${{ matrix.projectPath }}/Library
29+
key: Library-${{ matrix.projectPath }}
30+
restore-keys: |
31+
Library-
32+
- uses: game-ci/unity-test-runner@v2
33+
id: tests
34+
env:
35+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
36+
with:
37+
projectPath: ${{ matrix.projectPath }}
38+
testMode: ${{ matrix.testMode }}
39+
artifactsPath: ${{ matrix.testMode }}-artifacts
40+
githubToken: ${{ secrets.GITHUB_TOKEN }}
41+
checkName: ${{ matrix.testMode }} Test Results
42+
coverageOptions: 'generateAdditionalMetrics;assemblyFilters:+MyGameDevTools.Extensions'
43+
- name: Upload Coverage to Codecov
44+
uses: codecov/codecov-action@v3
45+
with:
46+
name: PlayMode
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
files: ${{ steps.tests.outputs.coveragePath }}/**/*.xml

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# This .gitignore file should be placed at the root of your Unity project directory
2+
[Ll]ibrary/
3+
[Tt]emp/
4+
[Oo]bj/
5+
[Bb]uild/
6+
[Bb]uilds/
7+
[Ll]ogs/
8+
[Uu]ser[Ss]ettings/
9+
[Cc]ode[Cc]overage/
10+
11+
# MemoryCaptures can get excessive in size.
12+
# They also could contain extremely sensitive data
13+
[Mm]emoryCaptures/
14+
15+
# Never ignore Asset meta data
16+
![Aa]ssets/**/*.meta
17+
18+
# Uncomment this line if you wish to ignore the asset store tools plugin
19+
[Aa]ssets/AssetStoreTools*
20+
21+
# Visual Studio cache directory
22+
.vs/
23+
.vsconfig
24+
25+
# VS Code
26+
.vscode/
27+
28+
# Rider
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+
# OS generated
61+
.DS_Store
62+
.DS_Store?
63+
._*
64+
.Spotlight-V100
65+
.Trashes
66+
ehthumbs.db
67+
Thumbs.db
68+
69+
# Builds
70+
*.apk
71+
*.unitypackage
72+
73+
# Crashlytics generated file
74+
crashlytics-build.properties
75+
76+
# Packed Addressables
77+
[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
78+
79+
# Temporary auto-generated Android Assets
80+
[Aa]ssets/[Ss]treamingAssets/aa.meta
81+
[Aa]ssets/[Ss]treamingAssets/aa/*

.releaserc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"plugins": [
44
["@semantic-release/commit-analyzer", { "preset": "angular" }],
55
"@semantic-release/release-notes-generator",
6-
["@semantic-release/changelog", { "preset": "angular" }],
6+
["@semantic-release/changelog", { "preset": "angular", "pkgRoot": "Packages/mygamedevtools-extensions" }],
77
["@semantic-release/npm", { "npmPublish": false }],
88
["@semantic-release/git", {
9-
"assets": ["package.json", "CHANGELOG.md"],
10-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
9+
"assets": ["Packages/mygamedevtools-extensions/package.json", "CHANGELOG.md"],
10+
"message": "ci(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
1111
}],
1212
"@semantic-release/github"
13-
]
13+
]
1414
}

Assets/Scenes.meta

Lines changed: 8 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)