[CI > Win] v1

This commit is contained in:
Ducko 2022-04-12 21:40:32 +01:00
parent 9f02bd7d9f
commit 121f344f84

View file

@ -80,32 +80,39 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup Node.js v16.x
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Retrieve artifact - name: Retrieve artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
with: with:
name: built-asar name: built-asar
path: artifact path: artifact
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
# - name: Extract artifact - name: Extract artifact
# run: | run: |
# cp artifact/app.asar . cp artifact/app.asar .
# - name: Download Client with OpenAsar - name: Setup Client
# run: | run: |
# wget "https://discord.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz # Download latest client from updater v2 and extract (manifest -> brotli -> tar)
# tar xf discord.tar.gz wget "$(curl https://discord.com/api/updates/distributions/app/manifests/latest\?channel\=canary\&platform\=win\&arch\=x86 | python -c 'import json,sys;print(json.load(sys.stdin)["full"]["url"])')"
# cp app.asar DiscordCanary/resources/app.asar node -e "fs.writeFileSync('full.tar', zlib.brotliDecompressSync(fs.readFileSync('full.distro')))"
tar xf full.tar
# - name: Check if Discord will startup # Install OpenAsar build and setup environment
# run: | sed -i "s/^\/\/ <TEST_FLAG_WINDOWS>.*$/if \(name == 'discord_rpc'\) { console.log\('ABRA'\); process.exit\(\); }/" app.asar
# coproc { xvfb-run -e /dev/stdout ./DiscordCanary/DiscordCanary --enable-logging; } cp -f app.asar files/resources/app.asar
# grep -m1 "Installing discord_rpc" <&${COPROC[0]} mkdir discord
# sleep 1 cp -rf files/ discord/app-1.0.0
# [[ $COPROC_PID ]] && kill $COPROC_PID cd discord/app-1.0.0
# timeout-minutes: 3
- name: Check if Discord will startup
run: |
./DiscordCanary.exe | grep -m1 "ABRA"
timeout-minutes: 3
release: release: