mirror of
https://github.com/MrUnknownDE/vcc-tools.git
synced 2026-05-04 22:26:06 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df4ade6977 | |||
| 889b677830 | |||
| 8c0935ac92 | |||
| 467f665303 | |||
| a0db61aa07 | |||
| 8a96aabad1 | |||
| 545e48e2e4 | |||
| 27a11704eb | |||
| dba802bf58 |
@@ -0,0 +1,90 @@
|
||||
name: VCC Release Automation
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*" # Startet z.B. bei v1.0.3
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Garantiert Rechte für Releases und Code-Pushes
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract Metadata
|
||||
id: metadata
|
||||
run: |
|
||||
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
|
||||
echo "pkg_name=$(jq -r .name package.json)" >> $GITHUB_OUTPUT
|
||||
echo "display_name=$(jq -r .displayName package.json)" >> $GITHUB_OUTPUT
|
||||
echo "description=$(jq -r .description package.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create VCC Package Zip
|
||||
run: |
|
||||
mkdir -p staging
|
||||
cp package.json README.md staging/
|
||||
cp -r Editor/ staging/
|
||||
cp Editor.meta package.json.meta README.md.meta staging/ 2>/dev/null || true
|
||||
cd staging
|
||||
zip -r ../${{ steps.metadata.outputs.pkg_name }}-${{ github.ref_name }}.zip *
|
||||
cd ..
|
||||
echo "--- ZIP INHALT PRÜFUNG ---"
|
||||
unzip -l ${{ steps.metadata.outputs.pkg_name }}-${{ github.ref_name }}.zip
|
||||
|
||||
- name: Upload GitHub Release Asset
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ steps.metadata.outputs.pkg_name }}-${{ github.ref_name }}.zip
|
||||
|
||||
- name: Update VCC Index
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Prüfen, ob der gh-pages Branch auf dem Server existiert
|
||||
if git ls-remote --heads origin gh-pages | grep -q gh-pages; then
|
||||
git checkout gh-pages
|
||||
else
|
||||
# Wenn nicht: Erstelle ihn als komplett leeren (orphan) Branch
|
||||
git checkout --orphan gh-pages
|
||||
git rm -rf . # Löscht alle Main-Dateien aus diesem Branch
|
||||
fi
|
||||
|
||||
# Basis-Struktur der index.json erstellen, falls sie noch nicht existiert
|
||||
if [ ! -f index.json ]; then
|
||||
echo '{"name":"mrunknownde VCC Tools","id":"de.mrunknownde.vccrepo","url":"https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/index.json","author":"mrunknownde","packages":{}}' > index.json
|
||||
fi
|
||||
|
||||
# URL zur gerade hochgeladenen ZIP-Datei im Release generieren
|
||||
ZIP_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/${{ steps.metadata.outputs.pkg_name }}-${{ github.ref_name }}.zip"
|
||||
|
||||
# Neue Version per jq sauber in die index.json injizieren
|
||||
jq --arg ver "${{ steps.metadata.outputs.version }}" \
|
||||
--arg name "${{ steps.metadata.outputs.pkg_name }}" \
|
||||
--arg disp "${{ steps.metadata.outputs.display_name }}" \
|
||||
--arg desc "${{ steps.metadata.outputs.description }}" \
|
||||
--arg url "$ZIP_URL" \
|
||||
'.packages[$name].versions[$ver] = {
|
||||
"name": $name,
|
||||
"version": $ver,
|
||||
"displayName": $disp,
|
||||
"description": $desc,
|
||||
"unity": "2022.3",
|
||||
"url": $url
|
||||
}' index.json > temp.json && mv temp.json index.json
|
||||
|
||||
# Änderungen stagen
|
||||
git add index.json
|
||||
|
||||
# Nur committen und pushen, wenn sich die JSON wirklich verändert hat (verhindert Action-Crash)
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -m "Auto-update VCC index.json for ${{ github.ref_name }}"
|
||||
git push origin gh-pages
|
||||
else
|
||||
echo "Keine Änderungen an der index.json festgestellt. Überspringe Push."
|
||||
fi
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "de.mrunknownde.gittool.Editor",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -17,7 +17,7 @@ You can add this tool as a custom package directly into your VCC.
|
||||
1. Open the VRChat Creator Companion.
|
||||
2. Navigate to **Settings** -> **Packages**.
|
||||
3. Click on **Add Repository**.
|
||||
4. Enter your custom repo URL: `[YOUR_INDEX_JSON_URL_HERE]`
|
||||
4. Enter your custom repo URL: `https://vcc.mrunk.de/index.json`
|
||||
5. In your project views, under "Manage Project", the **VRChat Git Control Tool** will now appear. Simply click the plus icon to add it.
|
||||
|
||||
## 🛠️ Manual Installation
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "MrUnknownDE's VCC Tools",
|
||||
"id": "de.mrunknownde.vcc-tools",
|
||||
"url": "https://vcc.mrunk.de/index.json",
|
||||
"author": "MrUnknownDE",
|
||||
"packages": {
|
||||
"de.mrunknownde.vcc-tools": {
|
||||
"versions": {
|
||||
"1.0.3": {
|
||||
"name": "de.mrunknownde.vcc-tools",
|
||||
"version": "1.0.3",
|
||||
"displayName": "MrUnknownDE's VRChat Tools",
|
||||
"url": "https://github.com/MrUnknownDE/vcc-tools/archive/refs/tags/v1.0.3.zip",
|
||||
"unity": "2022.3",
|
||||
"description": "A lightweight, integrated Git panel for Unity."
|
||||
},
|
||||
"1.0.2": {
|
||||
"name": "de.mrunknownde.vcc-tools",
|
||||
"version": "1.0.2",
|
||||
"displayName": "MrUnknownDE's VRChat Tools",
|
||||
"url": "https://github.com/MrUnknownDE/vcc-tools/archive/refs/tags/v1.0.2.zip",
|
||||
"unity": "2022.3",
|
||||
"description": "A lightweight, integrated Git panel for Unity."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "de.mrunknownde.gittool",
|
||||
"name": "de.mrunknownde.vcc-tools",
|
||||
"version": "1.0.0",
|
||||
"displayName": "VRChat Git Control Tool",
|
||||
"description": "A lightweight, integrated Git panel for Unity. Ideal for VRChat World/Avatar Creators to easily push commits directly from the editor to Gitea/GitHub/GitLab and other Git hosting services.",
|
||||
"displayName": "MrUnknownDE's VRChat Tools",
|
||||
"description": "A lightweight, integrated Git panel for Unity.",
|
||||
"unity": "2022.3",
|
||||
"author": {
|
||||
"name": "mrunknownde"
|
||||
"name": "MrUnknownDE"
|
||||
},
|
||||
"dependencies": {},
|
||||
"vpmDependencies": {}
|
||||
|
||||
Reference in New Issue
Block a user