This repository has been archived by the owner on May 21, 2024. It is now read-only.
Analyze UWP #2659
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Analyze UWP | |
permissions: write-all | |
on: | |
workflow_dispatch: | |
push: | |
schedule: | |
- cron: "0 * * * *" | |
env: | |
uwp_repo: 'Yakov5776/RobloxUWP-StoreLib' | |
jobs: | |
update_check: | |
runs-on: ubuntu-latest | |
outputs: | |
RELEASE_TAG: ${{ steps.get-tag.outputs.RELEASE_TAG }} | |
EXISTING_RELEASE: ${{ steps.check-tag.outputs.EXISTING_RELEASE }} | |
steps: | |
- name: Get latest UWP Release Tag | |
id: get-tag | |
run: | | |
response=$(curl -s "https://api.github.com/repos/${{env.uwp_repo}}/releases/latest") | |
tag=$(echo "$response" | jq -r '.tag_name') | |
echo "RELEASE_TAG=$tag" >> $GITHUB_OUTPUT | |
- name: Check if a newer version is available | |
id: check-tag | |
env: | |
RELEASE_TAG: ${{ steps.get-tag.outputs.RELEASE_TAG }} | |
run: | | |
response=$(curl -s "https://api.github.com/repos/${{github.repository}}/releases/tags/${{env.RELEASE_TAG}}") | |
id=$(echo "$response" | jq '.id' -r) | |
echo "EXISTING_RELEASE=$id" >> $GITHUB_OUTPUT | |
uwp: | |
needs: update_check | |
runs-on: self-hosted | |
timeout-minutes: 1440 | |
if: needs.update_check.outputs.EXISTING_RELEASE == 'null' | |
concurrency: | |
group: ${{ github.workflow }}-${ needs.update_check.outputs.RELEASE_TAG } | |
steps: | |
- name: Download Latest Release Binary | |
run: | | |
$url = (Invoke-RestMethod -Uri "https://api.github.com/repos/$env:uwp_repo/releases/latest").assets[0].browser_download_url | |
Invoke-WebRequest -Uri $url -OutFile "Roblox.zip" | |
Expand-Archive -Path "Roblox.zip" -DestinationPath . | |
Get-ChildItem -Filter "*Win32*.msix" -Recurse | ForEach-Object { | |
Move-Item $_.FullName RobloxBundle.zip | |
Expand-Archive -Path RobloxBundle.zip -Destination RobloxBundle | |
} | |
- name: Download IDA Pro 7.6 | |
run: | | |
Invoke-WebRequest -Uri "${{secrets.IDA_DL}}" -OutFile "ida.zip" | |
Expand-Archive -Path "ida.zip" -DestinationPath "ida" | |
- name: Accept Hex-Rays EULA | |
run: | | |
$registryPath = "HKCU:\SOFTWARE\Hex-Rays\IDA" | |
New-Item -Path $registryPath -Force | |
$idaSettings = @{ | |
"License IDA PRO 7.6 SP1" = 0x00000001 | |
"DisplayWelcome" = 0x00000000 | |
"RegistryVersion" = 0x000002d0 | |
"PortedToCss" = 0x00000001 | |
} | |
$idaSettings.GetEnumerator() | ForEach-Object { | |
Set-ItemProperty -Path $registryPath -Name $_.Key -Value $_.Value | |
} | |
- name: Analyze database | |
run: | | |
Start-Process -FilePath "ida/ida.exe" -ArgumentList "-c", "-A", "-Sqanalysis.idc", "RobloxBundle/Windows10Universal.exe" -Wait | |
- name: Pushing to release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ needs.update_check.outputs.RELEASE_TAG }} | |
tag: ${{ needs.update_check.outputs.RELEASE_TAG }} | |
body: ${{ needs.update_check.outputs.RELEASE_TAG }} | |
commit: ${{ github.sha }} | |
artifacts: "RobloxBundle/Windows10Universal.exe.idb" | |
allowUpdates: true | |
removeArtifacts: false | |
replacesArtifacts: false | |
- name: Run cleanup actions | |
if: always() | |
run: Get-ChildItem | Remove-Item -Recurse -Force |