From f785df0f45bde7f0561a1fc8a00b649e2e73a7fe Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 9 Jun 2024 07:42:34 +0900 Subject: [PATCH 01/17] ci: improved the coderabbit configuration --- .coderabbit.yaml | 8 +++++--- .gitattributes | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 53bb5d0..182ba1b 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -6,9 +6,11 @@ reviews: auto_review: enabled: true path_filters: - - '!Assets' - - '!Packages/com.vrchat.core.*/**/*' - - '!ProjectSettings' + - "!Assets" + - "!Packages/com.vrchat.core.*/**/*" + - "!ProjectSettings" path_instructions: + - instructions: This folder contains C# files, but these are UdonSharp and have different restrictions than standard C#. Please review with this in mind. + path: Assets/black.kit.*/Runtime/**/* - instructions: Some files look broken, but they contain templates from Scriban. Please review with this in mind. path: Website/**/* diff --git a/.gitattributes b/.gitattributes index 6791e8c..66a6d6d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,6 +10,7 @@ *.prefab merge=unityyamlmerge filter=vrc eol=lf text *.unity merge=unityyamlmerge filter=vrc eol=lf text +.coderabbit.yaml export-ignore .gitattributes export-ignore .github export-ignore .gitignore export-ignore From 40697f6edeeb06d6a28b00da969bc4bb41af1c04 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 9 Jun 2024 14:27:26 +0900 Subject: [PATCH 02/17] ci: added the imgbot configuration --- .gitattributes | 1 + .imgbotconfig | 4 ++++ .vscode/settings.json | 1 + 3 files changed, 6 insertions(+) create mode 100644 .imgbotconfig diff --git a/.gitattributes b/.gitattributes index 66a6d6d..6d554fe 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,4 +15,5 @@ .github export-ignore .gitignore export-ignore .gitkeep export-ignore +.imgbotconfig export-ignore reviewpad.yml export-ignore diff --git a/.imgbotconfig b/.imgbotconfig new file mode 100644 index 0000000..c46d50f --- /dev/null +++ b/.imgbotconfig @@ -0,0 +1,4 @@ +{ + "compressWiki": true, + "ignoredFiles": ["*.svg"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index d91f638..a4b0834 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "*.meta": "yaml", "*.prefab": "yaml", "*.uss": "css", + ".imgbotconfig": "json", "LICENSE": "plaintext" }, "files.readonlyInclude": { From 47df3e668e287113c2757953dd58de03ed5d4df2 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 9 Jun 2024 16:12:26 +0900 Subject: [PATCH 03/17] ci: added the dispatch action to curate this repository --- .github/workflows/build-listing.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-listing.yml b/.github/workflows/build-listing.yml index 7e903f2..792d751 100644 --- a/.github/workflows/build-listing.yml +++ b/.github/workflows/build-listing.yml @@ -70,3 +70,9 @@ jobs: - name: Deploy the uploaded VPM Listing Website to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + - name: Trigger the action of the curation repository + uses: peter-evans/repository-dispatch@v3 + with: + event-type: build-listing + repository: kurone-kito/vpm + token: ${{ secrets.REPO_TOKEN }} From 1d8350563f903659127ee0b404091e190a1cb716 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Sun, 9 Jun 2024 18:02:47 +0900 Subject: [PATCH 04/17] ci: improved the action that obtains package version --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d24c99b..5c310d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,12 +30,12 @@ jobs: steps: - name: Checkout Local Repository uses: actions/checkout@v4 - - name: Get the Package version based on the package.json file - id: version - uses: zoexx/github-action-json-file-properties@1.0.6 + - id: version + name: Get the Package version based on the package.json file + # cspell: disable-next-line + uses: sergeysova/jq-action@v2 with: - file_path: "${{ env.packagePath }}/package.json" - prop_path: "version" + cmd: jq -r ".version" "${{ env.packagePath }}/package.json" - name: Configure the Environment Variables needed for releasing the Package run: | echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV From d244c13fde62dcf53449af68e8a8e113b839de5c Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Mon, 10 Jun 2024 00:44:18 +0900 Subject: [PATCH 05/17] ci: added the process that creates the unitypackage.zip file --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c310d7..fac947d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV - name: Zip the Package for release working-directory: "${{ env.packagePath }}" - run: zip -r "${{ github.workspace }}/${{ env.zipFile }}" . + run: zip -r -9 "${{ github.workspace }}/${{ env.zipFile }}" . - name: Build a list of .meta files for future use run: find "${{ env.packagePath }}/" -name \*.meta >> metaList - name: Make a UnityPackage version of the Package for release @@ -51,6 +51,8 @@ jobs: with: package-path: ${{ env.unityPackage }} include-files: metaList + - name: Zip the UnityPackage for release + run: zip -r -9 "${{ env.unityPackage }}.zip" ${{ env.unityPackage }} LICENSE README.md - name: Create a release tag of the version from the package.json file id: tag_version uses: rickstaa/action-create-tag@v1 @@ -62,5 +64,6 @@ jobs: files: | ${{ env.zipFile }} ${{ env.unityPackage }} + ${{ env.unityPackage }}.zip ${{ env.packagePath }}/package.json tag_name: ${{ env.version }} From 9cd3784a4c12b3e24f8473a512c689cc578da080 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Mon, 10 Jun 2024 07:35:10 +0900 Subject: [PATCH 06/17] ci: added the declaration of the dynamic variables --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fac947d..755df5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,9 @@ jobs: contents: write env: packagePath: Packages/${{ vars.PACKAGE_NAME }} + unityPackage: + version: + zipFile: if: needs.config.outputs.config_package == 'true' steps: - name: Checkout Local Repository @@ -38,9 +41,9 @@ jobs: cmd: jq -r ".version" "${{ env.packagePath }}/package.json" - name: Configure the Environment Variables needed for releasing the Package run: | - echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV echo "version=${{ steps.version.outputs.value }}" >> $GITHUB_ENV + echo "zipFile=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}".zip >> $GITHUB_ENV - name: Zip the Package for release working-directory: "${{ env.packagePath }}" run: zip -r -9 "${{ github.workspace }}/${{ env.zipFile }}" . From 828cf3c730811632096b28344643ab3e7547c2fe Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Mon, 10 Jun 2024 07:41:55 +0900 Subject: [PATCH 07/17] ci: added the version detection for prerelease in release workflow --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 755df5a..fb1213b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,7 @@ jobs: contents: write env: packagePath: Packages/${{ vars.PACKAGE_NAME }} + stableVersion: unityPackage: version: zipFile: @@ -39,6 +40,14 @@ jobs: uses: sergeysova/jq-action@v2 with: cmd: jq -r ".version" "${{ env.packagePath }}/package.json" + - name: Detect whether the version is a stable release + id: stable-match + # cspell: disable-next-line + uses: kaisugi/action-regex-match@v1.0.1 + with: + flags: gm + regex: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + text: ${{ steps.version.outputs.value }} - name: Configure the Environment Variables needed for releasing the Package run: | echo "unityPackage=${{ vars.PACKAGE_NAME }}-${{ steps.version.outputs.value }}.unitypackage" >> $GITHUB_ENV @@ -69,4 +78,5 @@ jobs: ${{ env.unityPackage }} ${{ env.unityPackage }}.zip ${{ env.packagePath }}/package.json + prerelease: ${{ env.stableVersion == '' }} tag_name: ${{ env.version }} From 4e269abbb5f93e25383ec5cb4157979ba95b2b9b Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Mon, 10 Jun 2024 13:47:07 +0900 Subject: [PATCH 08/17] ci: added the signing with GPG --- .github/workflows/release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb1213b..6d07ff0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,14 @@ jobs: zipFile: if: needs.config.outputs.config_package == 'true' steps: + - id: gpg + name: Import the GPG key + # cspell: disable-next-line + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + trust_level: 5 - name: Checkout Local Repository uses: actions/checkout@v4 - id: version @@ -65,18 +73,30 @@ jobs: include-files: metaList - name: Zip the UnityPackage for release run: zip -r -9 "${{ env.unityPackage }}.zip" ${{ env.unityPackage }} LICENSE README.md + - name: Sign the artifacts + run: | + echo "${GPG_PASSPHRASE}" | gpg --batch -ab "${{ env.zipFile }}" + echo "${GPG_PASSPHRASE}" | gpg --batch -ab "${{ env.unityPackage }}" + echo "${GPG_PASSPHRASE}" | gpg --batch -ab "${{ env.unityPackage }}.zip" + env: + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - name: Create a release tag of the version from the package.json file id: tag_version uses: rickstaa/action-create-tag@v1 with: tag: "${{ env.version }}" + gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - name: Publish the Release to GitHub uses: softprops/action-gh-release@v2 with: files: | ${{ env.zipFile }} + ${{ env.zipFile }}.asc ${{ env.unityPackage }} + ${{ env.unityPackage }}.asc ${{ env.unityPackage }}.zip + ${{ env.unityPackage }}.zip.asc ${{ env.packagePath }}/package.json prerelease: ${{ env.stableVersion == '' }} tag_name: ${{ env.version }} From 89a1b3f6ca88eed489b99b958782cebc27a19a58 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Tue, 11 Jun 2024 00:42:28 +0900 Subject: [PATCH 09/17] docs: improved the documents --- .github/CODE_OF_CONDUCT.ja.md | 47 ++++++++++++++--------------------- .github/CONTRIBUTING.ja.md | 24 ++++++++---------- .github/CONTRIBUTING.md | 17 +++++++------ .github/CONTRIBUTING.zh.md | 11 +++----- README.md | 12 ++++++--- 5 files changed, 52 insertions(+), 59 deletions(-) diff --git a/.github/CODE_OF_CONDUCT.ja.md b/.github/CODE_OF_CONDUCT.ja.md index 406c083..62afaea 100644 --- a/.github/CODE_OF_CONDUCT.ja.md +++ b/.github/CODE_OF_CONDUCT.ja.md @@ -4,78 +4,65 @@ Language: [🇬🇧](./CODE_OF_CONDUCT.md) | **🇯🇵** | [🇨🇳](./CODE_OF ## 私たちの約束 -メンバー、コントリビューター、およびリーダーとして、年齢、体の大きさ、目に見えるまたは目に見えない障害、民族性、性別、 -性同一性、表現、経験のレベル、教育、社会経済的地位、国籍、人格、人種、宗教、または性的同一性と指向に関係なく、 -コミュニティへの参加をハラスメントのない体験にすることを誓います。 +メンバー、コントリビューター、およびリーダーとして、年齢、体の大きさ、目に見えるまたは目に見えない障害、民族性、性的特徴、性同一性とジェンダー表現、経験のレベル、教育、社会経済的地位、国籍、人格、人種、カースト、肌の色、宗教、または性的同一性と性的指向に関係なく、コミュニティへの参加をハラスメントのない体験にすることを誓います。 私たちは、オープンで親しみやすく、多様で包括的で健全なコミュニティに貢献する方法で行動し、交流することを誓います。 ## 私たちの標準 -前向きな環境を作り上げることに貢献する行動の例: +前向きな環境を作り上げることに貢献する行動の例: - 他人への共感と優しさを示す - - 異なる意見、視点、経験を尊重する - -- 建設的なフィードバックを与え、優雅に受け入れる - +- 建設的なフィードバックを与え、礼儀正しく受け入れる - 私たちの過ちの影響を受けた人々に責任を受け入れ、謝罪し、そしてその経験から学ぶ - - 個人としてだけでなく、コミュニティ全体にとっても最善であることに焦点を当てる -許容できない行動の例は次のとおりです。 +許容できない行動の例は次のとおりです: - 性的な言葉や画像の使用、および性的な注意またはその他あらゆる種類の問題行為 - - トローリング、侮辱的または中傷的なコメント、個人的または政治的攻撃 - - 公的またはプライベートの嫌がらせ - - 明示的な許可なしに、住所や電子メールアドレスなど、他者の個人情報を公開する - - 職業上不適切と合理的に考えられるその他の行為 ## 執行責任 コミュニティリーダーは、許容される行動の基準を明確にし、実施する責任があり、不適切、脅迫的、攻撃的、または有害と見なされる行動に応じて、適切で公正な是正措置を講じます。 -コミュニティリーダーは、コメント、コミット、コード、wiki の編集、問題、およびこの行動規範に沿っていないその他の貢献を削除、編集、または拒否する権利と責任を持ち、適切な場合はモデレーションの決定の理由を伝えます。 +コミュニティリーダーは、コメント、コミット、コード、wikiの編集、問題、およびこの行動規範に沿っていないその他の貢献を削除、編集、または拒否する権利と責任を持ち、適切な場合はモデレーションの決定の理由を伝えます。 ## 適用範囲 -この行動規範は、すべてのコミュニティスペース内で適用され、個人がパブリックスペースでコミュニティを公式に代表している場合にも適用されます。 -私たちのコミュニティを代表する例には、公式の電子メールアドレスの使用、公式のソーシャルメディアアカウントを介した投稿、オンラインまたはオフラインのイベントでの指定代理人としての行動などがあります。 +この行動規範は、すべてのコミュニティスペース内で適用され、個人がパブリックスペースでコミュニティを公式に代表している場合にも適用されます。私たちのコミュニティを代表する例には、公式の電子メールアドレスの使用、公式のソーシャルメディアアカウントを介した投稿、オンラインまたはオフラインのイベントでの指定代理人としての行動などがあります。 ## 執行 -虐待的、嫌がらせ、またはその他の許容できない行動の事例は、執行を担当するコミュニティリーダーに対して [Issues](https://github.com/kurone-kito/vpm-project-template/issues) で報告される場合があります。 -すべての苦情は迅速かつ公正にレビューおよび調査されます。 +虐待的、嫌がらせ、またはその他の許容できない行動の事例は、執行を担当するコミュニティリーダーに対して [Issues](https://github.com/kurone-kito/vpm-project-template/issues) で報告される場合があります。すべての苦情は迅速かつ公正にレビューおよび調査されます。 すべてのコミュニティリーダーは、問題の報告者のプライバシーとセキュリティを尊重する義務があります。 ## 執行ガイドライン -コミュニティリーダーは、この行動規範に違反していると見なした行動への帰結を判断する際に、これらのコミュニティガイドラインに従います。 +コミュニティリーダーは、この行動規範に違反していると見なした行動への帰結を判断する際に、これらのコミュニティガイドラインに従います: ### 1. 更生 **コミュニティへの影響**: コミュニティで専門家にふさわしくない、または歓迎されないと思われる不適切な言葉の使用やその他の不適切な行動をすること。 -**帰結**: コミュニティリーダーからの非公開の書面による警告。違反の理由を明確にし、行動が不適切だった理由を説明します。 公の謝罪が要求される場合があります。 +**帰結**: コミュニティリーダーからの非公開の書面による警告。違反の理由を明確にし、行動が不適切だった理由を説明します。公の謝罪が要求される場合があります。 ### 2. 警告 **コミュニティへの影響**: 単一の出来事または一連の動作による違反。 -**帰結**: 持続的な行動の結果を伴う警告。 指定された期間、行動規範の実施者との一方的な対話を含め、関係者との対話はありません。 これには、コミュニティスペースやソーシャルメディアなどの外部チャネルでの相互作用の回避が含まれます。 これらの条件に違反すると、一時的または永続的に禁止される場合があります。 +**帰結**: 持続的な行動の結果を伴う警告。指定された期間、行動規範の実施者との一方的な対話を含め、関係者との対話はありません。これには、コミュニティスペースやソーシャルメディアなどの外部チャネルでの相互作用の回避が含まれます。これらの条件に違反すると、一時的または永続的に禁止される場合があります。 ### 3. 一時的な禁止 **コミュニティへの影響**: 持続的で不適切な行動を含む、コミュニティ標準の重大な違反。 -**帰結**: 指定された期間のコミュニティとのあらゆる種類の相互関係または公的なコミュニケーションの一時的な禁止。 この期間中、行動規範を実施する人々との一方的な対話を含め、関係する人々との公的または私的な対話は許可されません。 -これらの条件に違反すると、永久的に禁止される場合があります。 +**帰結**: 指定された期間のコミュニティとのあらゆる種類の相互関係または公的なコミュニケーションの一時的な禁止。この期間中、行動規範を実施する人々との一方的な対話を含め、関係する人々との公的または私的な対話は許可されません。これらの条件に違反すると、永久的に禁止される場合があります。 ### 4. 永久的な禁止 @@ -85,10 +72,14 @@ Language: [🇬🇧](./CODE_OF_CONDUCT.md) | **🇯🇵** | [🇨🇳](./CODE_OF ## 帰属 -この行動規範は、 で利用可能な [Contributor Covenant][homepage] バージョン 2.0 を基に作成されています。 +この行動規範は、[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]で利用可能な[Contributor Covenant][homepage] バージョン 2.1を基に作成されています。 -コミュニティへの影響ガイドラインは[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity)に適合しています。 +コミュニティへの影響ガイドラインは[Mozilla's code of conduct enforcement ladder][Mozilla CoC]に適合しています。 -[homepage]: https://www.contributor-covenant.org +この行動規範に関する一般的な質問への回答については、[https://www.contributor-covenant.org/faq][FAQ]のFAQを参照してください。翻訳は[https://www.contributor-covenant.org/translations][translations]で入手できます。 -この行動規範に関する一般的な質問への回答については、 の FAQ を参照してください。翻訳は で入手できます。 +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/.github/CONTRIBUTING.ja.md b/.github/CONTRIBUTING.ja.md index e5c4fc6..99ff355 100644 --- a/.github/CONTRIBUTING.ja.md +++ b/.github/CONTRIBUTING.ja.md @@ -4,16 +4,14 @@ Language: [🇬🇧](./CONTRIBUTING.md) | **🇯🇵** | [🇨🇳](./CONTRIBUTI --- -このリポジトリに貢献する際には、変更を加える前に、このリポジトリの所有者と -[Issues](https://github.com/kurone-kito/vpm-project-template/issues) -やその他の方法で変更したいことについて最初に話し合ってください。 - -[行動規範](./CODE_OF_CONDUCT.ja.md)がありますので、 -プロジェクトとのやり取りのすべてに従ってください。 - -もしあなたのアイデアが小さな修正で示せるのなら、 -[Pull request](https://github.com/kurone-kito/vpm-project-template/pulls) -を直接活用してください。 - -このリポジトリでは、[英語、または日本語](https://translate.google.com/) -での議論を推奨しています。 +1. [行動規範](./CODE_OF_CONDUCT.ja.md)がありますので、 + プロジェクトとのやり取りのすべてに従ってください。 +2. このリポジトリに貢献する際には、変更を加える前に、このリポジトリの所有者と + [Issues](https://github.com/kurone-kito/vpm-project-template/issues) + やその他の方法で変更したいことについて最初に話し合ってください。 +3. もしあなたのアイデアが**小さな修正で示せるのなら、 + [Pull request](https://github.com/kurone-kito/vpm-project-template/pulls) + を直接活用**してください。 +4. このリポジトリでは、できる限り + **[英語、または日本語](https://translate.google.com/) + での議論**を推奨しています。 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index dca3bf6..d94338e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,10 +4,13 @@ Language: **🇬🇧** | [🇯🇵](./CONTRIBUTING.ja.md) | [🇨🇳](./CONTRIB --- -When contributing to this repository, please first discuss the change you wish to make via [Issues](https://github.com/kurone-kito/vpm-project-template/issues) or any other method with the owners of this repository before making a change. - -Please note we have a [code of conduct](./CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. - -If your idea can be shown with a minor fix, please use directly the [pull request](https://github.com/kurone-kito/vpm-project-template/pulls). - -In this repository, discussion [in English or Japanese](https://translate.google.com/) is recommended. +1. Please note we have a [code of conduct](./CODE_OF_CONDUCT.md), please + follow it in all your interactions with the project. +2. When contributing to this repository, + please first discuss the change you wish to make via + [Issues](https://github.com/kurone-kito/vpm-project-template/issues) or any + other method with the owners of this repository before making a change. +3. If your idea can be shown **with a minor fix, please use directly the + [pull request](https://github.com/kurone-kito/vpm-project-template/pulls)**. +4. In this repository, discussion + **[in English or Japanese](https://translate.google.com/) is recommended**. diff --git a/.github/CONTRIBUTING.zh.md b/.github/CONTRIBUTING.zh.md index 81198b0..efef65a 100644 --- a/.github/CONTRIBUTING.zh.md +++ b/.github/CONTRIBUTING.zh.md @@ -4,10 +4,7 @@ Language: [🇬🇧](./CONTRIBUTING.md) | [🇯🇵](./CONTRIBUTING.ja.md) | ** --- -在为此存储库做出贡献时,请首先在进行更改之前与该存储库的所有者讨论您希望通过问题或任何其他方法进行的更改。 - -请注意我们有[行为准则](./CODE_OF_CONDUCT.ja.md),请在与项目的所有互动中遵循。 - -如果您的想法可以通过小修复显示,请直接使用[拉取请求](https://github.com/kurone-kito/vpm-project-template/pulls)。 - -在此存储库中,建议使用[英语或日语](https://translate.google.com/)进行讨论。 +1. 请注意我们有[行为准则](./CODE_OF_CONDUCT.zh.md),请在与项目的所有互动中遵循。 +2. 在为此存储库做出贡献时,请首先在进行更改之前与该存储库的所有者讨论您希望通过问题或任何其他方法进行的更改。 +3. 如果您的想法可以通过**小修复显示,请直接使用[拉取请求](https://github.com/kurone-kito/vpm-project-template/pulls)**。 +4. 在此存储库中,建议**使用[英语或日语](https://translate.google.com/)进行**讨论。 diff --git a/README.md b/README.md index cc5c56f..d06304b 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,15 @@ My template for the VPM project (for VRChat worlds creation) ### 1. Import the registry via the VRChat Creator Companion (VCC) -(To be added) +Visit the **[VPM Catalogue page](https://kurone-kito.github.io/vpm/)** and click on the **Add to VCC** button. ### 2. Import the package to your project -(To be added) +1. Click on the "Manage Project" button in the VCC +2. Find the "VRChat Example Package" package and click on the "(+) Add package" button ### 3. Use the package, enjoy :D -(To be added) - ## 🤖 Setting up the Automation Create a repository variable with the name and value described below. @@ -35,6 +34,11 @@ Some other notes: - If you deviate from this folder structure, you'll need to update the paths that assume your package is in the "Packages" directory on lines 24, 38, 41 and 57. - If you want to store and generate your web files in a folder other than "Website" in the root, you can change the `listPublicDirectory` item [here in build-listing.yml](.github/workflows/build-listing.yml#L17). +## Contributing + +Welcome to contribute to this repository! For more details, +please refer to [CONTRIBUTING.md](.github/CONTRIBUTING.md). + ## License This repository is licensed under the [MIT License](LICENSE). From e0c41ce46e6018255dbb51146c4f75d9e94bb566 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Tue, 11 Jun 2024 07:50:18 +0900 Subject: [PATCH 10/17] fix: fixed the wrong configuration of the ASDF --- .tool-version => .tool-versions | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .tool-version => .tool-versions (100%) diff --git a/.tool-version b/.tool-versions similarity index 100% rename from .tool-version rename to .tool-versions From cda37800a5f9f21ea982d9a0508be9ca4a641dcd Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Tue, 11 Jun 2024 22:33:58 +0900 Subject: [PATCH 11/17] fix: fixed the problem that the pre-placement templates appear to have syntax errors --- Website/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Website/app.js b/Website/app.js index b15c8fe..7fd4f45 100644 --- a/Website/app.js +++ b/Website/app.js @@ -2,7 +2,7 @@ import { baseLayerLuminance, StandardLuminance } from 'https://unpkg.com/@fluent const LISTING_URL = "{{ listingInfo.Url }}"; -const PACKAGES = { +const PACKAGES = eval(`({ {{~ for package in packages ~}} "{{ package.Name }}": { name: "{{ package.Name }}", @@ -27,7 +27,7 @@ const PACKAGES = { licensesUrl: "{{ package.LicensesUrl }}", }, {{~ end ~}} -}; +})`); const setTheme = () => { const isDarkTheme = () => window.matchMedia("(prefers-color-scheme: dark)").matches; From b5bb9989fac1777d46970c125ac6b54d75bf64c9 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Tue, 11 Jun 2024 22:37:59 +0900 Subject: [PATCH 12/17] feat: improved the CSpell configuration --- .github/workflows/release.yml | 1 + cspell.config.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d07ff0..70e8c16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,6 +82,7 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - name: Create a release tag of the version from the package.json file id: tag_version + # cspell: disable-next-line uses: rickstaa/action-create-tag@v1 with: tag: "${{ env.version }}" diff --git a/cspell.config.yml b/cspell.config.yml index aab8c37..be3c94f 100644 --- a/cspell.config.yml +++ b/cspell.config.yml @@ -6,6 +6,7 @@ dictionaries: - en-gb - en-us - fsharp + - php enableGlobDot: true features: weighted-suggestions: true @@ -31,6 +32,8 @@ words: - kuroné - nunit - scriban + - spatialize - udon - vrcsdk - vrchat + - vstuc From c6cbfd82ef02d8c4c71958844a922ea1cec34d99 Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Wed, 12 Jun 2024 02:43:55 +0900 Subject: [PATCH 13/17] feat: improved the git configuration --- .gitattributes | 3 +-- .gitignore | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 6d554fe..3ebc5c7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -/Assets/UdonSharp/** linguist-vendored +/Assets/** linguist-vendored /Packages/*.json linguist-vendored /Packages/com.*/** linguist-vendored /Packages/dev.*/** linguist-vendored @@ -16,4 +16,3 @@ .gitignore export-ignore .gitkeep export-ignore .imgbotconfig export-ignore -reviewpad.yml export-ignore diff --git a/.gitignore b/.gitignore index 6bbf13f..f70b0df 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ Temporary Items /[Rr]ecordings/ # Uncomment this line if you wish to ignore the asset store tools plugin -# /[Aa]ssets/AssetStoreTools* +/[Aa]ssets/AssetStoreTools* # Autogenerated Jetbrains Rider plugin /[Aa]ssets/Plugins/Editor/JetBrains* @@ -195,9 +195,15 @@ $RECYCLE.BIN/ # Example scenes [Aa]ssets/Scenes* +# TextMesh Pro +Glyph Report.* + # UdonSharp [Aa]ssets/SerializedUdonPrograms* [Aa]ssets/UdonSharp/PrefabBuild* +# VRWorld Toolkit +[Aa]ssets/_LastBuild* + # Others debug.log* From b57d9fb61912a2013a0423287d2047db78eb60ea Mon Sep 17 00:00:00 2001 From: kurone-kito Date: Wed, 12 Jun 2024 07:51:14 +0900 Subject: [PATCH 14/17] style: linted --- .github/workflows/build-listing.yml | 16 +- .github/workflows/release.yml | 17 +- Website/app.js | 223 +++++++----- Website/index.html | 538 ++++++++++++++++++---------- Website/styles.css | 6 +- cspell.config.yml | 2 +- 6 files changed, 503 insertions(+), 299 deletions(-) diff --git a/.github/workflows/build-listing.yml b/.github/workflows/build-listing.yml index 792d751..7b3fa2a 100644 --- a/.github/workflows/build-listing.yml +++ b/.github/workflows/build-listing.yml @@ -12,13 +12,13 @@ on: types: - completed release: - types: - - created - - deleted - - edited - - published - - released - - unpublished + types: + - created + - deleted + - edited + - published + - released + - unpublished # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -28,7 +28,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: "pages" + group: pages cancel-in-progress: true jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70e8c16..f6dd477 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,15 +9,14 @@ jobs: outputs: config_package: ${{ steps.config_package.outputs.configPackage }} steps: - - - name: Ensure that required repository variable has been created for the Package - id: config_package - run: | - if [ "${{ vars.PACKAGE_NAME }}" != "" ]; then - echo "configPackage=true" >> $GITHUB_OUTPUT; - else - echo "configPackage=false" >> $GITHUB_OUTPUT; - fi + - name: Ensure that required repository variable has been created for the Package + id: config_package + run: | + if [ "${{ vars.PACKAGE_NAME }}" != "" ]; then + echo "configPackage=true" >> $GITHUB_OUTPUT; + else + echo "configPackage=false" >> $GITHUB_OUTPUT; + fi build: needs: config diff --git a/Website/app.js b/Website/app.js index 7fd4f45..6dabb39 100644 --- a/Website/app.js +++ b/Website/app.js @@ -1,4 +1,7 @@ -import { baseLayerLuminance, StandardLuminance } from 'https://unpkg.com/@fluentui/web-components'; +import { + baseLayerLuminance, + StandardLuminance, +} from "https://unpkg.com/@fluentui/web-components"; const LISTING_URL = "{{ listingInfo.Url }}"; @@ -30,141 +33,177 @@ const PACKAGES = eval(`({ })`); const setTheme = () => { - const isDarkTheme = () => window.matchMedia("(prefers-color-scheme: dark)").matches; + const isDarkTheme = () => + window.matchMedia("(prefers-color-scheme: dark)").matches; if (isDarkTheme()) { - baseLayerLuminance.setValueFor(document.documentElement, StandardLuminance.DarkMode); + baseLayerLuminance.setValueFor( + document.documentElement, + StandardLuminance.DarkMode + ); } else { - baseLayerLuminance.setValueFor(document.documentElement, StandardLuminance.LightMode); + baseLayerLuminance.setValueFor( + document.documentElement, + StandardLuminance.LightMode + ); } -} +}; (() => { setTheme(); - window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => { - setTheme(); - }); + window + .matchMedia("(prefers-color-scheme: dark)") + .addEventListener("change", () => { + setTheme(); + }); - const packageGrid = document.getElementById('packageGrid'); + const packageGrid = document.getElementById("packageGrid"); - const searchInput = document.getElementById('searchInput'); - searchInput.addEventListener('input', ({ target: { value = '' }}) => { - const items = packageGrid.querySelectorAll('fluent-data-grid-row[row-type="default"]'); - items.forEach(item => { - if (value === '') { - item.style.display = 'grid'; + const searchInput = document.getElementById("searchInput"); + searchInput.addEventListener("input", ({ target: { value = "" } }) => { + const items = packageGrid.querySelectorAll( + 'fluent-data-grid-row[row-type="default"]' + ); + items.forEach((item) => { + if (value === "") { + item.style.display = "grid"; return; } if ( - item.dataset?.packageName?.toLowerCase()?.includes(value.toLowerCase()) || + item.dataset?.packageName + ?.toLowerCase() + ?.includes(value.toLowerCase()) || item.dataset?.packageId?.toLowerCase()?.includes(value.toLowerCase()) ) { - item.style.display = 'grid'; + item.style.display = "grid"; } else { - item.style.display = 'none'; + item.style.display = "none"; } }); }); - const urlBarHelpButton = document.getElementById('urlBarHelp'); - const addListingToVccHelp = document.getElementById('addListingToVccHelp'); - urlBarHelpButton.addEventListener('click', () => { + const urlBarHelpButton = document.getElementById("urlBarHelp"); + const addListingToVccHelp = document.getElementById("addListingToVccHelp"); + urlBarHelpButton.addEventListener("click", () => { addListingToVccHelp.hidden = false; }); - const addListingToVccHelpClose = document.getElementById('addListingToVccHelpClose'); - addListingToVccHelpClose.addEventListener('click', () => { + const addListingToVccHelpClose = document.getElementById( + "addListingToVccHelpClose" + ); + addListingToVccHelpClose.addEventListener("click", () => { addListingToVccHelp.hidden = true; }); - const vccListingInfoUrlFieldCopy = document.getElementById('vccListingInfoUrlFieldCopy'); - vccListingInfoUrlFieldCopy.addEventListener('click', () => { - const vccUrlField = document.getElementById('vccListingInfoUrlField'); + const vccListingInfoUrlFieldCopy = document.getElementById( + "vccListingInfoUrlFieldCopy" + ); + vccListingInfoUrlFieldCopy.addEventListener("click", () => { + const vccUrlField = document.getElementById("vccListingInfoUrlField"); vccUrlField.select(); navigator.clipboard.writeText(vccUrlField.value); - vccUrlFieldCopy.appearance = 'accent'; + vccUrlFieldCopy.appearance = "accent"; setTimeout(() => { - vccUrlFieldCopy.appearance = 'neutral'; + vccUrlFieldCopy.appearance = "neutral"; }, 1000); }); - const vccAddRepoButton = document.getElementById('vccAddRepoButton'); - vccAddRepoButton.addEventListener('click', () => window.location.assign(`vcc://vpm/addRepo?url=${encodeURIComponent(LISTING_URL)}`)); + const vccAddRepoButton = document.getElementById("vccAddRepoButton"); + vccAddRepoButton.addEventListener("click", () => + window.location.assign( + `vcc://vpm/addRepo?url=${encodeURIComponent(LISTING_URL)}` + ) + ); - const vccUrlFieldCopy = document.getElementById('vccUrlFieldCopy'); - vccUrlFieldCopy.addEventListener('click', () => { - const vccUrlField = document.getElementById('vccUrlField'); + const vccUrlFieldCopy = document.getElementById("vccUrlFieldCopy"); + vccUrlFieldCopy.addEventListener("click", () => { + const vccUrlField = document.getElementById("vccUrlField"); vccUrlField.select(); navigator.clipboard.writeText(vccUrlField.value); - vccUrlFieldCopy.appearance = 'accent'; + vccUrlFieldCopy.appearance = "accent"; setTimeout(() => { - vccUrlFieldCopy.appearance = 'neutral'; + vccUrlFieldCopy.appearance = "neutral"; }, 1000); }); - const rowMoreMenu = document.getElementById('rowMoreMenu'); - const hideRowMoreMenu = e => { + const rowMoreMenu = document.getElementById("rowMoreMenu"); + const hideRowMoreMenu = (e) => { if (rowMoreMenu.contains(e.target)) return; - document.removeEventListener('click', hideRowMoreMenu); + document.removeEventListener("click", hideRowMoreMenu); rowMoreMenu.hidden = true; - } + }; - const rowMenuButtons = document.querySelectorAll('.rowMenuButton'); - rowMenuButtons.forEach(button => { - button.addEventListener('click', e => { + const rowMenuButtons = document.querySelectorAll(".rowMenuButton"); + rowMenuButtons.forEach((button) => { + button.addEventListener("click", (e) => { if (rowMoreMenu?.hidden) { rowMoreMenu.style.top = `${e.clientY + e.target.clientHeight}px`; rowMoreMenu.style.left = `${e.clientX - 120}px`; rowMoreMenu.hidden = false; - const downloadLink = rowMoreMenu.querySelector('#rowMoreMenuDownload'); + const downloadLink = rowMoreMenu.querySelector("#rowMoreMenuDownload"); const downloadListener = () => { - window.open(e?.target?.dataset?.packageUrl, '_blank'); - } - downloadLink.addEventListener('change', () => { + window.open(e?.target?.dataset?.packageUrl, "_blank"); + }; + downloadLink.addEventListener("change", () => { downloadListener(); - downloadLink.removeEventListener('change', downloadListener); + downloadLink.removeEventListener("change", downloadListener); }); setTimeout(() => { - document.addEventListener('click', hideRowMoreMenu); + document.addEventListener("click", hideRowMoreMenu); }, 1); } }); }); - const packageInfoModal = document.getElementById('packageInfoModal'); - const packageInfoModalClose = document.getElementById('packageInfoModalClose'); - packageInfoModalClose.addEventListener('click', () => { + const packageInfoModal = document.getElementById("packageInfoModal"); + const packageInfoModalClose = document.getElementById( + "packageInfoModalClose" + ); + packageInfoModalClose.addEventListener("click", () => { packageInfoModal.hidden = true; }); // Fluent dialogs use nested shadow-rooted elements, so we need to use JS to style them - const modalControl = packageInfoModal.shadowRoot.querySelector('.control'); + const modalControl = packageInfoModal.shadowRoot.querySelector(".control"); modalControl.style.maxHeight = "90%"; - modalControl.style.transition = 'height 0.2s ease-in-out'; - modalControl.style.overflowY = 'hidden'; - - const packageInfoName = document.getElementById('packageInfoName'); - const packageInfoId = document.getElementById('packageInfoId'); - const packageInfoVersion = document.getElementById('packageInfoVersion'); - const packageInfoDescription = document.getElementById('packageInfoDescription'); - const packageInfoAuthor = document.getElementById('packageInfoAuthor'); - const packageInfoDependencies = document.getElementById('packageInfoDependencies'); - const packageInfoKeywords = document.getElementById('packageInfoKeywords'); - const packageInfoLicense = document.getElementById('packageInfoLicense'); - - const rowAddToVccButtons = document.querySelectorAll('.rowAddToVccButton'); + modalControl.style.transition = "height 0.2s ease-in-out"; + modalControl.style.overflowY = "hidden"; + + const packageInfoName = document.getElementById("packageInfoName"); + const packageInfoId = document.getElementById("packageInfoId"); + const packageInfoVersion = document.getElementById("packageInfoVersion"); + const packageInfoDescription = document.getElementById( + "packageInfoDescription" + ); + const packageInfoAuthor = document.getElementById("packageInfoAuthor"); + const packageInfoDependencies = document.getElementById( + "packageInfoDependencies" + ); + const packageInfoKeywords = document.getElementById("packageInfoKeywords"); + const packageInfoLicense = document.getElementById("packageInfoLicense"); + + const rowAddToVccButtons = document.querySelectorAll(".rowAddToVccButton"); rowAddToVccButtons.forEach((button) => { - button.addEventListener('click', () => window.location.assign(`vcc://vpm/addRepo?url=${encodeURIComponent(LISTING_URL)}`)); + button.addEventListener("click", () => + window.location.assign( + `vcc://vpm/addRepo?url=${encodeURIComponent(LISTING_URL)}` + ) + ); }); - const rowPackageInfoButton = document.querySelectorAll('.rowPackageInfoButton'); + const rowPackageInfoButton = document.querySelectorAll( + ".rowPackageInfoButton" + ); rowPackageInfoButton.forEach((button) => { - button.addEventListener('click', e => { + button.addEventListener("click", (e) => { const packageId = e.target.dataset?.packageId; const packageInfo = PACKAGES?.[packageId]; if (!packageInfo) { - console.error(`Did not find package ${packageId}. Packages available:`, PACKAGES); + console.error( + `Did not find package ${packageId}. Packages available:`, + PACKAGES + ); return; } @@ -176,30 +215,30 @@ const setTheme = () => { packageInfoAuthor.href = packageInfo.author.url; if ((packageInfo.keywords?.length ?? 0) === 0) { - packageInfoKeywords.parentElement.classList.add('hidden'); + packageInfoKeywords.parentElement.classList.add("hidden"); } else { - packageInfoKeywords.parentElement.classList.remove('hidden'); + packageInfoKeywords.parentElement.classList.remove("hidden"); packageInfoKeywords.innerHTML = null; - packageInfo.keywords.forEach(keyword => { - const keywordDiv = document.createElement('div'); - keywordDiv.classList.add('me-2', 'mb-2', 'badge'); + packageInfo.keywords.forEach((keyword) => { + const keywordDiv = document.createElement("div"); + keywordDiv.classList.add("me-2", "mb-2", "badge"); keywordDiv.textContent = keyword; packageInfoKeywords.appendChild(keywordDiv); }); } if (!packageInfo.license?.length && !packageInfo.licensesUrl?.length) { - packageInfoLicense.parentElement.classList.add('hidden'); + packageInfoLicense.parentElement.classList.add("hidden"); } else { - packageInfoLicense.parentElement.classList.remove('hidden'); - packageInfoLicense.textContent = packageInfo.license ?? 'See License'; - packageInfoLicense.href = packageInfo.licensesUrl ?? '#'; + packageInfoLicense.parentElement.classList.remove("hidden"); + packageInfoLicense.textContent = packageInfo.license ?? "See License"; + packageInfoLicense.href = packageInfo.licensesUrl ?? "#"; } packageInfoDependencies.innerHTML = null; Object.entries(packageInfo.dependencies).forEach(([name, version]) => { - const depRow = document.createElement('li'); - depRow.classList.add('mb-2'); + const depRow = document.createElement("li"); + depRow.classList.add("mb-2"); depRow.textContent = `${name} @ v${version}`; packageInfoDependencies.appendChild(depRow); }); @@ -207,25 +246,29 @@ const setTheme = () => { packageInfoModal.hidden = false; setTimeout(() => { - const height = packageInfoModal.querySelector('.col').clientHeight; - modalControl.style.setProperty('--dialog-height', `${height + 14}px`); + const height = packageInfoModal.querySelector(".col").clientHeight; + modalControl.style.setProperty("--dialog-height", `${height + 14}px`); }, 1); }); }); - const packageInfoVccUrlFieldCopy = document.getElementById('packageInfoVccUrlFieldCopy'); - packageInfoVccUrlFieldCopy.addEventListener('click', () => { - const vccUrlField = document.getElementById('packageInfoVccUrlField'); + const packageInfoVccUrlFieldCopy = document.getElementById( + "packageInfoVccUrlFieldCopy" + ); + packageInfoVccUrlFieldCopy.addEventListener("click", () => { + const vccUrlField = document.getElementById("packageInfoVccUrlField"); vccUrlField.select(); navigator.clipboard.writeText(vccUrlField.value); - vccUrlFieldCopy.appearance = 'accent'; + vccUrlFieldCopy.appearance = "accent"; setTimeout(() => { - vccUrlFieldCopy.appearance = 'neutral'; + vccUrlFieldCopy.appearance = "neutral"; }, 1000); }); - const packageInfoListingHelp = document.getElementById('packageInfoListingHelp'); - packageInfoListingHelp.addEventListener('click', () => { + const packageInfoListingHelp = document.getElementById( + "packageInfoListingHelp" + ); + packageInfoListingHelp.addEventListener("click", () => { addListingToVccHelp.hidden = false; }); -})(); \ No newline at end of file +})(); diff --git a/Website/index.html b/Website/index.html index 8bb119c..e2da52f 100644 --- a/Website/index.html +++ b/Website/index.html @@ -1,188 +1,314 @@ - - - - VCC Listing - - - - - -
-
- {{~ if listingInfo.BannerImage; ~}} -
- {{~ end; ~}} -

- {{~ listingInfo.Name ~}} -

- {{~ if listingInfo.Description; ~}} + + + + VCC Listing + + + + + +
+
+ {{~ if listingInfo.BannerImage; ~}} +
+ {{~ end; ~}} +

{{~ listingInfo.Name ~}}

+ {{~ if listingInfo.Description; ~}}
{{ listingInfo.Description }}
- {{~ end; ~}} -
- {{~ if listingInfo.Author.Email; ~}} - - {{ listingInfo.Author.Email }} - {{~ end; ~}} - - {{~ if listingInfo.InfoLink.Url ~}} +
+ {{~ if listingInfo.Author.Email; ~}} + + {{ listingInfo.Author.Email }} + + {{~ end; ~}} +
+ Published by + {{ listingInfo.Author.Name }} +
+ {{~ if listingInfo.InfoLink.Url ~}} - {{~ end; ~}} + {{~ end; ~}} +
-
-
- - - Add to VCC - - - - - Copy - - - How to add a listing to your VCC - - - - - - -
-