Skip to content

Commit

Permalink
use vrchat-community/template-package
Browse files Browse the repository at this point in the history
  • Loading branch information
Alofoxx committed May 20, 2023
1 parent ef49ceb commit f9d32cf
Show file tree
Hide file tree
Showing 117 changed files with 30,772 additions and 3 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build-listing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Repo Listing

env:
CurrentPackageName: com.vrchat.demo-template
listPublishDirectory: Website
pathToCi: ci

on:
workflow_dispatch:
workflow_run:
workflows: [Build Release]
types:
- completed
release:
types: [published, created, edited, unpublished, deleted, released]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:

build-listing:
name: build-listing
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3 # check out this repo
- uses: actions/checkout@v3 # check out automation repo
with:
repository: vrchat-community/package-list-action
path: ${{env.pathToCi}}
clean: false # otherwise the local repo will no longer be checked out

- name: Restore Cache
uses: actions/cache@v3
with:
path: |
${{env.pathToCi}}/.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}

- name: Build Package Version Listing
run: ${{env.pathToCi}}/build.cmd BuildRepoListing --root ${{env.pathToCi}} --list-publish-directory $GITHUB_WORKSPACE/${{env.listPublishDirectory}} --current-package-name ${{env.CurrentPackageName}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{env.listPublishDirectory}}

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build Release

on:
workflow_dispatch:
push:
branches: main
paths: Packages/com.furality.sylvashader/**

env:
packageName: "com.furality.sylvashader"

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- name: get version
id: version
uses: notiz-dev/github-action-json-property@7c8cf5cc36eb85d8d287a8086a39dac59628eb31
with:
path: "Packages/${{env.packageName}}/package.json"
prop_path: "version"

- name: Set Environment Variables
run: |
echo "zipFile=${{ env.packageName }}-${{ steps.version.outputs.prop }}".zip >> $GITHUB_ENV
echo "unityPackage=${{ env.packageName }}-${{ steps.version.outputs.prop }}.unitypackage" >> $GITHUB_ENV
- name: Create Zip
uses: thedoctor0/zip-release@09336613be18a8208dfa66bd57efafd9e2685657
with:
type: "zip"
directory: "Packages/${{env.packageName}}/"
filename: "../../${{env.zipFile}}" # make the zip file two directories up, since we start two directories in above

- run: find "Packages/${{env.packageName}}/" -name \*.meta >> metaList

- name: Create UnityPackage
uses: pCYSl5EDgo/create-unitypackage@cfcd3cf0391a5ef1306342794866a9897c32af0b
with:
package-path: ${{ env.unityPackage }}
include-files: metaList


- name: Make Release
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
with:
tag_name: ${{ steps.version.outputs.prop }}
files: |
${{ env.zipFile }}
${{ env.unityPackage }}
Packages/${{ env.packageName }}/package.json
65 changes: 65 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/

# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

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

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.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
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties

.idea/.idea.vpm-package-maker/.idea
Assets/PackageMakerWindowData.asset*
.idea
.vscode
.DS_Store
Empty file added Assets/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions Packages/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*/
!com.vrchat.core.*

# Change this to match your new package name
!com.furality.sylvashader
8 changes: 8 additions & 0 deletions Packages/com.furality.sylvashader/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Packages/com.furality.sylvashader/Editor/UI.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f9d32cf

Please sign in to comment.