Try using Python instead

This commit is contained in:
Marquis Kurt 2019-12-23 14:03:56 -05:00
parent f35f3ef9dc
commit 877d2512fc
No known key found for this signature in database
GPG Key ID: 725636D259F5402D
1 changed files with 13 additions and 3 deletions

View File

@ -12,10 +12,20 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Modify config.json
- name: Change desktop field
run: |
((Get-Content -Path .\public\config.json -Raw) -replace '/\"location\"?: \"https?:\/\/([A-Za-z0-9.]+)\",/g','\"location\": \"desktop\",') | Set-Content -Path .\public\config.json
shell: powershell
from json import load, dump
json_dict = {}
with open('public/config.json', 'r') as file:
json_dict = load(file)
json_dict["location"] = "desktop"
with open('public/config.json', 'w+') as out:
dump(json_dict, out)
shell: python
- name: Install dependencies and build
run: |
npm install