node-sword-interface 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,15 +3,29 @@ name: node-sword-interface build
|
|
|
3
3
|
on: push
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
|
-
|
|
7
|
-
name: Run build
|
|
6
|
+
build-linux:
|
|
7
|
+
name: Run Linux build
|
|
8
8
|
runs-on: ubuntu-20.04
|
|
9
9
|
steps:
|
|
10
10
|
- uses: actions/checkout@v2
|
|
11
11
|
- uses: actions/setup-node@v2
|
|
12
12
|
with:
|
|
13
|
-
node-version: '
|
|
13
|
+
node-version: '14'
|
|
14
14
|
|
|
15
15
|
- run: sudo apt update && sudo apt install -y libcurl4-gnutls-dev
|
|
16
16
|
- run: npm install
|
|
17
|
+
- run: npm run doc
|
|
18
|
+
|
|
19
|
+
build-windows:
|
|
20
|
+
name: Run Windows build
|
|
21
|
+
runs-on: windows-2019
|
|
22
|
+
env:
|
|
23
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v2
|
|
26
|
+
- uses: actions/setup-node@v2
|
|
27
|
+
with:
|
|
28
|
+
node-version: '14'
|
|
29
|
+
|
|
30
|
+
- run: npm install --arch=ia32
|
|
17
31
|
- run: npm run doc
|
package/package.json
CHANGED
|
@@ -29,11 +29,25 @@ function unzip {
|
|
|
29
29
|
$AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
|
|
30
30
|
[System.Net.ServicePointManager]::SecurityProtocol = $AllProtocols
|
|
31
31
|
|
|
32
|
+
$headers = @{}
|
|
33
|
+
|
|
34
|
+
$github_token = $env:GITHUB_TOKEN
|
|
35
|
+
|
|
32
36
|
# --- Set the uri for the release
|
|
33
37
|
$URI = "https://api.github.com/repos/ezra-bible-app/sword-build-win32/releases/tags/v1.8.900-2022-11-06"
|
|
34
38
|
|
|
39
|
+
if ($Env:CI -eq "true") {
|
|
40
|
+
Write-Host "GitHub actions build ... using GITHUB_TOKEN for authentication!"
|
|
41
|
+
|
|
42
|
+
$headers = @{
|
|
43
|
+
Authorization="Bearer $github_token"
|
|
44
|
+
ContentType='application/json'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
# --- Query the API to get the url of the zip
|
|
36
|
-
$Response = Invoke-RestMethod -Method Get -Uri $URI
|
|
49
|
+
$Response = Invoke-RestMethod -Method Get -Uri $URI -Headers $headers
|
|
50
|
+
|
|
37
51
|
$ZipName = $Response.assets[0].name
|
|
38
52
|
$ZipUrl = $Response.assets[0].browser_download_url
|
|
39
53
|
|
|
@@ -44,7 +58,7 @@ if (Test-Path sword-build-win32) {
|
|
|
44
58
|
|
|
45
59
|
# --- Download the file to the current location
|
|
46
60
|
$OutputPath = "$((Get-Location).Path)\$ZipName"
|
|
47
|
-
Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath
|
|
61
|
+
Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath -Headers $headers
|
|
48
62
|
|
|
49
63
|
# --- Unzip the zip file and remove it afterwards
|
|
50
64
|
unzip $OutputPath $((Get-Location).Path)
|
|
@@ -52,4 +66,6 @@ Remove-Item $OutputPath
|
|
|
52
66
|
|
|
53
67
|
# --- Rename the extracted folder to a standard name
|
|
54
68
|
$LibDirName = $ZipName.Replace(".zip", "")
|
|
55
|
-
Rename-Item -Path $LibDirName -NewName sword-build-win32
|
|
69
|
+
Rename-Item -Path $LibDirName -NewName sword-build-win32
|
|
70
|
+
|
|
71
|
+
Write-Host "Download of Windows library artifacts completed!"
|