11on :
22 push :
33 branches :
4- - master
5- - backport/*
4+ - figma
65 tags :
76 - v*.*.*
87 pull_request :
98
109name : Testing
1110
11+ permissions :
12+ id-token : write
13+ contents : read
14+
1215jobs :
1316 linux-tests :
1417 name : " Linux Tests"
1518 strategy :
1619 matrix :
17- node : [12, 14 ]
20+ node : [16 ]
1821 runs-on : ubuntu-latest
1922 container : ubuntu:16.04
2023 steps :
5356 GYP_DEFINES : use_obsolete_asm=true
5457 # There is a race condition in node/generate that needs to be fixed
5558 run : |
56- npm set unsafe-perm true
59+ chown root .
5760 node utils/retry npm install
5861
5962 - name : Test
@@ -63,12 +66,15 @@ jobs:
6366 ssh-add ~/.ssh_tests/id_rsa
6467 node utils/retry npm test
6568
69+ - name : configure aws credentials
70+ if : startsWith(github.ref, 'refs/tags/v')
71+ uses : aws-actions/configure-aws-credentials@v1
72+ with :
73+ role-to-assume : arn:aws:iam::060562746757:role/nodegit-repository
74+ aws-region : us-west-2
75+
6676 - name : Deploy
6777 if : startsWith(github.ref, 'refs/tags/v')
68- env :
69- node_pre_gyp_bucket : ${{ secrets.node_pre_gyp_bucket }}
70- node_pre_gyp_accessKeyId : ${{ secrets.node_pre_gyp_accessKeyId }}
71- node_pre_gyp_secretAccessKey : ${{ secrets.node_pre_gyp_secretAccessKey }}
7278 run : |
7379 npm install -g node-pre-gyp aws-sdk
7480 node lifecycleScripts/clean
7985 name : " macOS Tests"
8086 strategy :
8187 matrix :
82- node : [12, 14 ]
88+ node : [16 ]
8389 runs-on : macOS-10.15
8490 # This is mostly the same as the Linux steps, waiting for anchor support
8591 # https://github.com/actions/runner/issues/1182
@@ -121,74 +127,17 @@ jobs:
121127 ssh-add ~/.ssh_tests/id_rsa
122128 node utils/retry npm test
123129
130+ - name : configure aws credentials
131+ if : startsWith(github.ref, 'refs/tags/v')
132+ uses : aws-actions/configure-aws-credentials@v1
133+ with :
134+ role-to-assume : arn:aws:iam::060562746757:role/nodegit-repository
135+ aws-region : us-west-2
136+
124137 - name : Deploy
125138 if : startsWith(github.ref, 'refs/tags/v')
126- env :
127- node_pre_gyp_bucket : ${{ secrets.node_pre_gyp_bucket }}
128- node_pre_gyp_accessKeyId : ${{ secrets.node_pre_gyp_accessKeyId }}
129- node_pre_gyp_secretAccessKey : ${{ secrets.node_pre_gyp_secretAccessKey }}
130139 run : |
131140 npm install -g node-pre-gyp aws-sdk
132141 node lifecycleScripts/clean
133142 node-pre-gyp package
134143 node-pre-gyp publish
135-
136- windows-tests :
137- name : Windows Tests
138- strategy :
139- matrix :
140- node : [12, 14]
141- arch : [x86, x64]
142- runs-on : windows-2016
143- steps :
144- - name : Setup Environment
145- run : |
146- git config --file C:\ProgramData\Git\config core.autocrlf input
147- git config --system core.autocrlf input
148- git config --global core.autocrlf input
149- git config --global user.name "John Doe"
150- git config --global user.email [email protected] 151-
152- - uses : actions/checkout@v2
153-
154- - name : Use Node.js
155- uses : implausible/setup-node@feature/expose-architecture-override
156- env :
157- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
158- with :
159- node-version : ${{ matrix.node }}
160- check-latest : true
161- node-arch : ${{ matrix.arch }}
162-
163- - name : Install
164- run : npm install
165-
166- - name : Test
167- env :
168- GIT_SSH : ${{ github.workspace }}\vendor\plink.exe
169- run : |
170- powershell -command "Start-Process ${{ github.workspace }}\vendor\pageant.exe ${{ github.workspace }}\vendor\private.ppk"
171- node utils/retry npm test
172-
173- # You're probably wondering why this isn't a single `run: |` step, it certainly is for *nix,
174- # but it's not, because the CI runner for windows doesn't wait for each step as listed here
175- # and it treats each additional step past the first as an orphaned process.
176- - name : Deploy (Dependencies)
177- if : startsWith(github.ref, 'refs/tags/v')
178- run : npm install -g node-pre-gyp aws-sdk
179-
180- - name : Deploy (Clean)
181- if : startsWith(github.ref, 'refs/tags/v')
182- run : node lifecycleScripts\clean
183-
184- - name : Deploy (Package)
185- if : startsWith(github.ref, 'refs/tags/v')
186- run : node-pre-gyp package
187-
188- - name : Deploy (Publish)
189- if : startsWith(github.ref, 'refs/tags/v')
190- env :
191- node_pre_gyp_bucket : ${{ secrets.node_pre_gyp_bucket }}
192- node_pre_gyp_accessKeyId : ${{ secrets.node_pre_gyp_accessKeyId }}
193- node_pre_gyp_secretAccessKey : ${{ secrets.node_pre_gyp_secretAccessKey }}
194- run : node-pre-gyp publish
0 commit comments