File tree Expand file tree Collapse file tree 9 files changed +363
-84
lines changed
Expand file tree Collapse file tree 9 files changed +363
-84
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ GoogleChromePortable
33__pycache__ /
44dist /
55build /
6+ node_modules
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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 ( ) ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments