update_compat_db: release zipped database

This commit is contained in:
nishinji 2024-05-04 23:51:21 +09:00
parent 7202a72214
commit 6199132232
2 changed files with 14 additions and 4 deletions

View File

@ -276,9 +276,7 @@ jobs:
comment_close_body="@$issue_author your ${github_event_name_friendly,,} was automatically closed because it didn't follow the issue templates."
comment_close_body+=$'\n'"Here is what's wrong with your compatibility report:"
comment_close_body+="$compatibility_report_invalid_reasons"
if [ $GITHUB_EVENT_NAME = issues ]; then
comment_close_body+=$'\n\n'"**Don't submit a new ${github_event_name_friendly,,}.** Just edit this one and if it's valid it will be automatically reopened."
fi
comment_close_body+=$'\n\n'"**Don't submit a new issue.** Just edit this one and if it's valid it will be automatically reopened."
comment_close_body+=$'\n\n'"If you want help with Vita3K and/or your game go to our Discord server's #help channel: https://discord.gg/6aGwQzh"
gh "${github_event_name_friendly,,}" comment $issue_number -b "$comment_close_body"
if [ -n "$issue_duplicates" ]; then

View File

@ -77,6 +77,18 @@ jobs:
$issue_id_updated = $app_updated.number
Add-Content -Path $env:GITHUB_ENV -Value "issue_id_updated=$issue_id_updated"
- name: Zip compatibility database
run: |
Compress-Archive -Path app_compat_db.xml -DestinationPath app_compat_db.xml.zip
7z a -mx=9 app_compat_db.xml.7z app_compat_db.xml
- name: Prepare files for release
run: |
mkdir compat_dbs
cp app_compat_db.xml compat_dbs/
cp app_compat_db.xml.zip compat_dbs/
cp app_compat_db.xml.7z compat_dbs/
- name: Upload compatibility database
run: |
Invoke-WebRequest "https://github.com/tcnksm/ghr/releases/download/v0.16.2/ghr_v0.16.2_windows_amd64.zip" -OutFile ghr.zip
@ -87,6 +99,6 @@ jobs:
Invoke-RestMethod -Uri $release.url -Method DELETE -Headers @{Authorization = "Bearer $env:GITHUB_TOKEN"}
}
}
.\ghr_v0.16.2_windows_amd64\ghr -u Vita3K -r compatibility -n "Automatic CI generated database" -b "Corresponding issue: #${{ env.issue_id_updated }} for App: ${{ env.app_updated_title }}`r`nUpdated at: ${{ env.db_updated_at }}" -t "${{ secrets.GITHUB_TOKEN }}" compat_db app_compat_db.xml
.\ghr_v0.16.2_windows_amd64\ghr -u Vita3K -r compatibility -n "Automatic CI generated database" -b "Corresponding issue: #${{ env.issue_id_updated }} for App: ${{ env.app_updated_title }}`r`nUpdated at: ${{ env.db_updated_at }}" -t "${{ secrets.GITHUB_TOKEN }}" compat_db compat_dbs/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}