From a5a0fa5ee759c8c34ec221a8b0427ca794695b07 Mon Sep 17 00:00:00 2001 From: goaaats <16760685+goaaats@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:33:17 +0200 Subject: [PATCH] Add auto-repo --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a16039a9..da20a3d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,3 +58,42 @@ jobs: asset_path: ./Penumbra.zip asset_name: Penumbra.zip asset_content_type: application/zip + + - name: Write out repo.json + run: | + $ver = '${{ github.ref }}' -replace 'refs/tags/','' + + $json = '[' + $json += ' {' + $json += ' "Author": "Adam",' + $json += ' "Name": "Penumbra",' + $json += ' "Description": "Runtime mod loader and manager.",' + $json += ' "InternalName": "Penumbra",' + $json += ' "AssemblyVersion": "1.0.0.0",' + $json += ' "TestingAssemblyVersion": "1.0.0.0",' + $json += ' "RepoUrl": "https://github.com/xivdev/Penumbra",' + $json += ' "ApplicableVersion": "any",' + $json += ' "DalamudApiLevel": 4,' + $json += ' "IsHide": "False",' + $json += ' "IsTestingExclusive": "False",' + $json += ' "DownloadCount": 0,' + $json += ' "LastUpdate": 0,' + $json += ' "DownloadLinkInstall": "https://github.com/xivdev/Penumbra/releases/download/1.0.0.0/Penumbra.zip",' + $json += ' "DownloadLinkTesting": "https://github.com/xivdev/Penumbra/releases/download/1.0.0.0/Penumbra.zip",' + $json += ' "DownloadLinkUpdate": "https://github.com/xivdev/Penumbra/releases/download/1.0.0.0/Penumbra.zip",' + $json += ' "IconUrl": "https://github.com/Ottermandias/DalamudRepos/raw/master/images/icon.png"' + $json += ' }' + $json += ']' + + $json = $json -replace '1.0.0.0',$ver + set-content -Path "./repo.json" -Value $json + + - name: Commit repo.json + run: | + git config --global user.name "Actions User" + git config --global user.email "actions@github.com" + + git add repo.json + git commit -m "[CI] Updating repo.json for ${{ github.ref }}" || true + + git push origin main || true