node-sword-interface 1.0.7 → 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
- test:
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: '12'
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-sword-interface",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Javascript (N-API) interface to SWORD library",
5
5
  "keywords": [
6
6
  "C++",
@@ -31,17 +31,23 @@ $AllProtocols = [System.Net.SecurityProtocolType]'Tls11,Tls12'
31
31
 
32
32
  $headers = @{}
33
33
 
34
- if (Test-Path env:CI) {
35
- $headers = @{
36
- Authorization="Bearer ${$secrets.GITHUB_TOKEN}"
37
- }
38
- }
34
+ $github_token = $env:GITHUB_TOKEN
39
35
 
40
36
  # --- Set the uri for the release
41
37
  $URI = "https://api.github.com/repos/ezra-bible-app/sword-build-win32/releases/tags/v1.8.900-2022-11-06"
42
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
+
43
48
  # --- Query the API to get the url of the zip
44
49
  $Response = Invoke-RestMethod -Method Get -Uri $URI -Headers $headers
50
+
45
51
  $ZipName = $Response.assets[0].name
46
52
  $ZipUrl = $Response.assets[0].browser_download_url
47
53
 
@@ -52,7 +58,7 @@ if (Test-Path sword-build-win32) {
52
58
 
53
59
  # --- Download the file to the current location
54
60
  $OutputPath = "$((Get-Location).Path)\$ZipName"
55
- Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath
61
+ Invoke-RestMethod -Method Get -Uri $ZipUrl -OutFile $OutputPath -Headers $headers
56
62
 
57
63
  # --- Unzip the zip file and remove it afterwards
58
64
  unzip $OutputPath $((Get-Location).Path)
@@ -61,3 +67,5 @@ Remove-Item $OutputPath
61
67
  # --- Rename the extracted folder to a standard name
62
68
  $LibDirName = $ZipName.Replace(".zip", "")
63
69
  Rename-Item -Path $LibDirName -NewName sword-build-win32
70
+
71
+ Write-Host "Download of Windows library artifacts completed!"