Skip to content

Commit d4f5983

Browse files
committed
Initial commit
0 parents  commit d4f5983

63 files changed

Lines changed: 4725 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build Repo Listing
2+
3+
env:
4+
listPublishDirectory: Website
5+
pathToCi: ci
6+
7+
on:
8+
workflow_dispatch:
9+
workflow_run:
10+
workflows: [Build Release]
11+
types:
12+
- completed
13+
release:
14+
types: [published, created, edited, unpublished, deleted, released]
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow one concurrent deployment
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
29+
# Build the VPM Listing Website and deploy to GitHub Pages
30+
build-listing:
31+
name: build-listing
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
runs-on: ubuntu-latest
36+
steps:
37+
38+
# Checkout Local Repository
39+
- name: Checkout Local Repository
40+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
41+
42+
# Checkout Automation Repository without removing prior checkouts
43+
- name: Checkout Automation Repository
44+
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
45+
with:
46+
repository: vrchat-community/package-list-action
47+
path: ${{ env.pathToCi }}
48+
clean: false
49+
50+
# Load cached data from previous runs
51+
- name: Restore Cache
52+
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
53+
with:
54+
path: |
55+
${{ env.pathToCi }}/.nuke/temp
56+
~/.nuget/packages
57+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
58+
59+
# Build Package Version Listing with Nuke
60+
- name: Build Package Version Listing
61+
run: ${{ env.pathToCi }}/build.cmd BuildRepoListing --root ${{ env.pathToCi }} --list-publish-directory $GITHUB_WORKSPACE/${{ env.listPublishDirectory }} --current-package-name ${{ vars.PACKAGE_NAME }}
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
65+
# Prepare for GitHub Pages deployment
66+
- name: Setup Pages
67+
uses: actions/configure-pages@f156874f8191504dae5b037505266ed5dda6c382
68+
69+
# Upload the VPM Listing Website to GitHub Pages artifacts
70+
- name: Upload Pages Artifact
71+
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c
72+
with:
73+
path: ${{ env.listPublishDirectory }}
74+
75+
# Deploy the uploaded VPM Listing Website to GitHub Pages
76+
- name: Deploy to GitHub Pages
77+
id: deployment
78+
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5

.github/workflows/release.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
8+
# Validate Repository Configuration
9+
config:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
config_package: ${{ steps.config_package.outputs.configPackage }}
13+
steps:
14+
15+
# Ensure that required repository variable has been created for the Package
16+
- name: Validate Package Config
17+
id: config_package
18+
run: |
19+
if [ "${{ vars.PACKAGE_NAME }}" != "" ]; then
20+
echo "configPackage=true" >> $GITHUB_OUTPUT;
21+
else
22+
echo "configPackage=false" >> $GITHUB_OUTPUT;
23+
fi
24+
25+
# Build and release the Package
26+
# If the repository is not configured properly, this job will be skipped
27+
build:
28+
needs: config
29+
runs-on: ubuntu-latest
30+
permissions:
31+
contents: write
32+
env:
33+
packagePath: Packages/${{ vars.PACKAGE_NAME }}
34+
if: needs.config.outputs.config_package == 'true'
35+
steps:
36+
37+
# Checkout Local Repository
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
# Get the Package version based on the package.json file
42+
- name: Get Version
43+
id: version
44+
uses: zoexx/github-action-json-file-properties@release
45+
with:
46+
file_path: "${{ env.packagePath }}/package.json"
47+
prop_path: "version"
48+
49+
# Configure the Environment Variables needed for releasing the Package
50+
- name: Set Environment Variables
51+
run: |
52+
echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV
53+
echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV
54+
echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV
55+
56+
# Zip the Package for release
57+
- name: Create Package Zip
58+
working-directory: "${{ env.packagePath }}"
59+
run: zip -r "${{ github.workspace }}/${{ env.zipFile }}" .
60+
61+
# Build a list of .meta files for future use
62+
- name: Track Package Meta Files
63+
run: find "${{ env.packagePath }}/" -name \*.meta >> metaList
64+
65+
# Make a UnityPackage version of the Package for release
66+
- name: Create UnityPackage
67+
uses: pCYSl5EDgo/create-unitypackage@master
68+
with:
69+
package-path: ${{ env.unityPackage }}
70+
include-files: metaList
71+
72+
# Make a release tag of the version from the package.json file
73+
- name: Create Tag
74+
id: tag_version
75+
uses: rickstaa/action-create-tag@v1
76+
with:
77+
tag: "${{ env.version }}"
78+
79+
# Publish the Release to GitHub
80+
- name: Make Release
81+
uses: softprops/action-gh-release@v2
82+
with:
83+
files: |
84+
${{ env.zipFile }}
85+
${{ env.unityPackage }}
86+
${{ env.packagePath }}/package.json
87+
tag_name: ${{ env.version }}

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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+
# Gradle cache directory
26+
.gradle/
27+
28+
# Autogenerated VS/MD/Consulo solution and project files
29+
ExportedObj/
30+
.consulo/
31+
*.csproj
32+
*.unityproj
33+
*.sln
34+
*.suo
35+
*.tmp
36+
*.user
37+
*.userprefs
38+
*.pidb
39+
*.booproj
40+
*.svd
41+
*.pdb
42+
*.mdb
43+
*.opendb
44+
*.VC.db
45+
46+
# Unity3D generated meta files
47+
*.pidb.meta
48+
*.pdb.meta
49+
*.mdb.meta
50+
51+
# Unity3D generated file on crash reports
52+
sysinfo.txt
53+
54+
# Builds
55+
*.apk
56+
*.unitypackage
57+
58+
# Crashlytics generated file
59+
crashlytics-build.properties
60+
61+
.idea/.idea.vpm-package-maker/.idea
62+
Assets/PackageMakerWindowData.asset*
63+
.idea
64+
.vscode

Assets/.gitkeep

Whitespace-only changes.

Packages/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*/
2+
!com.vrchat.core.*
3+
4+
# Change this to match your new package name
5+
!blueamulet.udonsharpoptimizer
6+
!USOPatch.csproj
7+
!USOPatch.sln

Packages/blueamulet.udonsharpoptimizer/Editor.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.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "BlueAmulet.UdonSharpOptimizer",
3+
"rootNamespace": "UdonSharpOptimizer",
4+
"references": [
5+
"VRC.SDK3",
6+
"VRC.SDK3.Editor",
7+
"VRC.SDKBase",
8+
"VRC.SDKBase.Editor",
9+
"UdonSharp.Editor"
10+
],
11+
"includePlatforms": [
12+
"Editor"
13+
],
14+
"excludePlatforms": [],
15+
"allowUnsafeCode": false,
16+
"overrideReferences": true,
17+
"precompiledReferences": [
18+
"0Harmony.dll",
19+
"Microsoft.CodeAnalysis.dll"
20+
],
21+
"autoReferenced": true,
22+
"defineConstraints": [],
23+
"versionDefines": [],
24+
"noEngineReferences": false
25+
}

Packages/blueamulet.udonsharpoptimizer/Editor/BlueAmulet.UdonSharpOptimizer.asmdef.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)