Skip to content

Commit 3a8ec20

Browse files
Add templates
1 parent 568d272 commit 3a8ec20

File tree

9 files changed

+229
-0
lines changed

9 files changed

+229
-0
lines changed

templates/base/.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
/[Uu]ser[Ss]ettings/
12+
13+
# MemoryCaptures can get excessive in size.
14+
# They also could contain extremely sensitive data
15+
/[Mm]emoryCaptures/
16+
17+
# Asset meta data should only be ignored when the corresponding asset is also ignored
18+
!/[Aa]ssets/**/*.meta
19+
20+
# Uncomment this line if you wish to ignore the asset store tools plugin
21+
# /[Aa]ssets/AssetStoreTools*
22+
23+
# Autogenerated Jetbrains Rider plugin
24+
/[Aa]ssets/Plugins/Editor/JetBrains*
25+
26+
# Visual Studio cache directory
27+
.vs/
28+
29+
# Gradle cache directory
30+
.gradle/
31+
32+
# Autogenerated VS/MD/Consulo solution and project files
33+
ExportedObj/
34+
.consulo/
35+
*.csproj
36+
*.unityproj
37+
*.sln
38+
*.suo
39+
*.tmp
40+
*.user
41+
*.userprefs
42+
*.pidb
43+
*.booproj
44+
*.svd
45+
*.pdb
46+
*.mdb
47+
*.opendb
48+
*.VC.db
49+
50+
# Unity3D generated meta files
51+
*.pidb.meta
52+
*.pdb.meta
53+
*.mdb.meta
54+
55+
# Unity3D generated file on crash reports
56+
sysinfo.txt
57+
58+
# Builds
59+
*.apk
60+
*.aab
61+
*.unitypackage
62+
63+
# Crashlytics generated file
64+
crashlytics-build.properties
65+
66+
# Packed Addressables
67+
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
68+
69+
# Temporary auto-generated Android Assets
70+
/[Aa]ssets/[Ss]treamingAssets/aa.meta
71+
/[Aa]ssets/[Ss]treamingAssets/aa/*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Project description
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "<%= namespace %>.Runtime",
3+
"references": [],
4+
"includePlatforms": [],
5+
"excludePlatforms": [],
6+
"allowUnsafeCode": false,
7+
"overrideReferences": false,
8+
"precompiledReferences": [],
9+
"autoReferenced": true,
10+
"defineConstraints": [],
11+
"versionDefines": [],
12+
"noEngineReferences": false
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using UnityEngine;
2+
3+
namespace <%= namespace %>
4+
{
5+
public class HelloWorld : MonoBehaviour
6+
{
7+
void Start()
8+
{
9+
Debug.Log("Hello World");
10+
}
11+
}
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "<%= packageName %>",
3+
"version": "1.0.0",
4+
"displayName": "<%= displayName %>",
5+
"description": "<%= description %>",
6+
"unity": "<%= unityVersion %>",
7+
"keywords": [],
8+
"author": {
9+
"name": "<%= author.name %>",
10+
"email": "<%= author.email %>"
11+
},
12+
"dependencies": {}
13+
}

templates/base/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# <%= displayName %>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
name: CI
3+
on:
4+
push:
5+
branches:
6+
- master
7+
jobs:
8+
release:
9+
name: release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Semantic release
16+
id: semantic
17+
uses: cycjimmy/semantic-release-action@v2
18+
with:
19+
extra_plugins: |
20+
@semantic-release/changelog
21+
@semantic-release/git
22+
branch: master
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Create upm branch
26+
run: |
27+
git branch -d upm &> /dev/null || echo upm branch not found
28+
git subtree split -P "$PKG_ROOT" -b upm
29+
git checkout upm
30+
if [[ -d "Samples" ]]; then
31+
git mv Samples Samples~
32+
rm -f Samples.meta
33+
git config --global user.name 'github-bot'
34+
git config --global user.email 'github-bot@users.noreply.github.com'
35+
git commit -am "fix: Samples => Samples~"
36+
fi
37+
git push -f -u origin upm
38+
env:
39+
PKG_ROOT: Assets/Package
40+
- name: Create upm git tag
41+
if: steps.semantic.outputs.new_release_published == 'true'
42+
run: |
43+
git tag $TAG upm
44+
git push origin --tags
45+
env:
46+
TAG: ${{ steps.semantic.outputs.new_release_version }}

templates/ci/.releaserc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"tagFormat": "v${version}",
3+
"plugins": [
4+
[
5+
"@semantic-release/commit-analyzer",
6+
{
7+
"preset": "angular"
8+
}
9+
],
10+
"@semantic-release/release-notes-generator",
11+
[
12+
"@semantic-release/changelog",
13+
{
14+
"preset": "angular"
15+
}
16+
],
17+
[
18+
"@semantic-release/npm",
19+
{
20+
"npmPublish": false,
21+
"pkgRoot": "Assets/Package"
22+
}
23+
],
24+
[
25+
"@semantic-release/git",
26+
{
27+
"assets": [
28+
"Assets/Package/package.json",
29+
"CHANGELOG.md"
30+
],
31+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
32+
}
33+
],
34+
"@semantic-release/github"
35+
]
36+
}

templates/ci/releaserc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"tagFormat": "source-${version}",
3+
"plugins": [
4+
[
5+
"@semantic-release/commit-analyzer",
6+
{
7+
"preset": "angular"
8+
}
9+
],
10+
"@semantic-release/release-notes-generator",
11+
[
12+
"@semantic-release/changelog",
13+
{
14+
"preset": "angular"
15+
}
16+
],
17+
[
18+
"@semantic-release/npm",
19+
{
20+
"npmPublish": false,
21+
"pkgRoot": "Assets/Package"
22+
}
23+
],
24+
[
25+
"@semantic-release/git",
26+
{
27+
"assets": [
28+
"Assets/Package/package.json",
29+
"CHANGELOG.md"
30+
],
31+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
32+
}
33+
],
34+
"@semantic-release/github"
35+
]
36+
}

0 commit comments

Comments
 (0)