Skip to content

Commit e4c4bec

Browse files
committed
Attempting a Windows 10 app build
1 parent 7e09f3d commit e4c4bec

File tree

9 files changed

+363
-84
lines changed

9 files changed

+363
-84
lines changed

.github/workflows/compiler.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Compile and Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
env:
12+
archive: pogify-streamer-client-win10
13+
url: https://pogify-dev.herokuapp.com/
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Print GitHub context
17+
env:
18+
GITHUB_CONTEXT: ${{ toJson(github) }}
19+
run: echo "$GITHUB_CONTEXT"
20+
- uses: actions/setup-node@v1
21+
with:
22+
node-version: '12'
23+
- run: npm install
24+
- name: Download the package
25+
run: |
26+
node index.js --url=$url --archive $archive
27+
- name: Zip the app
28+
run: |
29+
cd ./$archive/projects/windows10
30+
zip -r ../../../$archive.zip *
31+
cd ../../..
32+
- name: Upload binaries to release
33+
uses: svenstaro/upload-release-action@v1-release
34+
with:
35+
repo_token: ${{ secrets.GITHUB_TOKEN }}
36+
file: ${{ env.archive }}.zip
37+
asset_name: ${{ env.archive }}.zip
38+
tag: ${{ github.ref }}
39+
overwrite: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ GoogleChromePortable
33
__pycache__/
44
dist/
55
build/
6+
node_modules

Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

favicon.ico

-16.6 KB
Binary file not shown.

index.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
const fetch = require("node-fetch");
2+
const { program } = require('commander');
3+
const fs = require('fs');
4+
const unzipper = require('unzipper');
5+
program.option('--url <url>', 'url of the pwa');
6+
program.option('--archive <archive>', 'name of the archive');
7+
program.parse(process.argv);
8+
9+
const appurl = program.url;
10+
const appname = program.archive;
11+
12+
async function main() {
13+
var manifest = await (await fetch(`https://pwabuilder-api-prod.azurewebsites.net/manifests`, {
14+
method: 'POST',
15+
headers: {
16+
'Accept': 'application/json',
17+
'Content-Type': 'application/json'
18+
},
19+
body: JSON.stringify({
20+
siteUrl: appurl
21+
})
22+
})).json();
23+
var id = manifest.id;
24+
var response = await (await fetch(
25+
`https://pwabuilder-api-prod.azurewebsites.net/manifests/${id}/build?ids=1&href=${appurl}`,
26+
{
27+
method: 'POST',
28+
headers: {
29+
'Accept': 'application/json',
30+
'Content-Type': 'application/json'
31+
},
32+
body: JSON.stringify({
33+
platforms: ["windows10"],
34+
dirSuffix: "windows10",
35+
parameters: []
36+
})
37+
},
38+
)).json();
39+
console.log(response);
40+
var archive = response.archive;
41+
(await fetch(archive)).body.pipe(unzipper.Extract({ path: appname }));
42+
}
43+
44+
main();

launch.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

launch.spec

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)