-
Notifications
You must be signed in to change notification settings - Fork 1.9k
684 lines (684 loc) · 21.7 KB
/
build_and_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
name: facebook/flow/build_and_test
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
tags:
- v*
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CLOUDFRONT_ID: ${{ secrets.CLOUDFRONT_ID }}
CLOUDFRONT_ID_NEW_WEBSITE: ${{ secrets.CLOUDFRONT_ID_NEW_WEBSITE }}
DOC_BOT_TOKEN: ${{ secrets.DOC_BOT_TOKEN }}
FLOW_BIN_PRIVATE_KEY_BASE64: ${{ secrets.FLOW_BIN_PRIVATE_KEY_BASE64 }}
FLOW_BOT_EMAIL: ${{ secrets.FLOW_BOT_EMAIL }}
FLOW_BOT_TOKEN: ${{ secrets.FLOW_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_BUCKET_NEW_WEBSITE: ${{ secrets.S3_BUCKET_NEW_WEBSITE }}
jobs:
build_js:
runs-on: ubuntu-latest
container:
image: flowtype/flow-ci:linux-x86_64
options: --user root
env:
TERM: dumb
OPAMYES: true
steps:
- uses: actions/[email protected]
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Install extra deps from opam
run: make deps-js
- name: Build flow.js
run: opam exec -- make js
- name: Build flow_parser.js
run: opam exec -- make -C src/parser js
- name: Create artifacts
run: |-
mkdir -p dist
cp src/parser/flow_parser.js dist/flow_parser.js
cp src/parser/flow_parser.js packages/flow-parser/flow_parser.js
- uses: actions/[email protected]
with:
name: build_js_bin
path: bin/flow.js
- uses: actions/[email protected]
with:
name: build_js_dist
path: dist/flow_parser.js
- uses: actions/[email protected]
with:
name: build_js_packages
path: packages/flow-parser/flow_parser.js
build_linux:
runs-on: ubuntu-latest
container:
image: flowtype/flow-ci:linux-x86_64
options: --user root
env:
TERM: dumb
OPAMYES: true
steps:
- uses: actions/[email protected]
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Install extra deps from opam
run: make deps-js
- name: Build flow
run: |-
opam exec -- make bin/flow dist/flow.zip
mkdir -p bin/linux && cp bin/flow bin/linux/flow
- name: Build libflowparser
run: opam exec -- make -C src/parser dist/libflowparser.zip
- name: Create artifacts
run: |-
cp dist/flow.zip dist/flow-linux64.zip
cp src/parser/dist/libflowparser.zip dist/libflowparser-linux64.zip
- uses: actions/[email protected]
with:
name: build_linux_bin
path: bin/linux/flow
- uses: actions/[email protected]
with:
name: build_linux_dist
path: |
dist/flow-linux64.zip
dist/libflowparser-linux64.zip
build_macos:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '13.4'
- name: Update curl cacerts
run: echo "cacert $GITHUB_WORKSPACE/.circleci/cacert.pem" >> ~/.curlrc
- uses: ./.github/actions/install-opam-mac
with:
arch: x86_64
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Build flow
run: |-
opam exec -- make bin/flow dist/flow.zip
mkdir -p bin/macos && cp bin/flow bin/macos/flow
- name: Build libflowparser
run: opam exec -- make -C src/parser dist/libflowparser.zip
- name: Create artifacts
run: |-
cp dist/flow.zip dist/flow-osx.zip
cp src/parser/dist/libflowparser.zip dist/libflowparser-osx.zip
- uses: actions/[email protected]
with:
name: build_macos_bin
path: bin/macos/flow
- uses: actions/[email protected]
with:
name: build_macos_dist
path: |
dist/flow-osx.zip
dist/libflowparser-osx.zip
build_macos_arm64:
runs-on: macos-13-xlarge
steps:
- uses: actions/[email protected]
- uses: maxim-lobanov/[email protected]
with:
xcode-version: 14.2.0
- name: Update curl cacerts
run: echo "cacert $GITHUB_WORKSPACE/.circleci/cacert.pem" >> ~/.curlrc
- uses: ./.github/actions/install-opam-mac
with:
arch: arm64
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Build flow
run: |-
opam exec -- make bin/flow dist/flow.zip
mkdir -p bin/macos-arm64 && cp bin/flow bin/macos-arm64/flow
- name: Build libflowparser
run: opam exec -- make -C src/parser dist/libflowparser.zip
- name: Create artifacts
run: |-
cp dist/flow.zip dist/flow-osx-arm64.zip
cp src/parser/dist/libflowparser.zip dist/libflowparser-osx-arm64.zip
- uses: actions/[email protected]
with:
name: build_macos_arm64_bin
path: bin/macos-arm64/flow
- uses: actions/[email protected]
with:
name: build_macos_arm64_dist
path: |
dist/flow-osx-arm64.zip
dist/libflowparser-osx-arm64.zip
build_win:
runs-on: windows-latest
env:
FLOW_TMP_DIR: C:\tmp\flow
OPAMDOWNLOADJOBS: 1
steps:
- uses: actions/[email protected]
- name: Set up workspace
run: mkdir $Env:FLOW_TMP_DIR
- name: Install dependencies
run: |
choco install --no-progress -y --source https://chocolatey.org/api/v2/ 7zip
setx /M PATH $($Env:PATH + ';C:\Program Files\7-Zip')
shell: pwsh
- name: Install cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: >-
rsync
patch
diffutils
curl
make
zip
unzip
git
m4
perl
mingw64-x86_64-gcc-core
mingw64-x86_64-gcc-g++
mingw-w64-x86_64-gcc-libs
coreutils
moreutils
- name: Install opam
run: .\scripts\windows\install_opam.ps1
shell: pwsh
- name: Cache
uses: actions/[email protected]
with:
key: opam-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashfiles('flowtype.opam', 'flow_parser.opam', '.circleci/config.yml') }}
path: |
$Env:HOME/.opam
_opam
- name: Init opam
run: opam init default 'https://github.com/ocaml-opam/opam-repository-mingw.git#opam2' --bare --disable-sandboxing --no-setup
shell: C:\cygwin\bin\bash.exe -leo pipefail '{0}'
- name: Create opam switch
run: |-
make deps
shell: C:\cygwin\bin\bash.exe '{0}'
env:
PATH: /usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
- name: Build flow.exe
run: >-
cd ${GITHUB_WORKSPACE} ;
eval $(opam env) ;
make bin/flow.exe dist/flow.zip ;
mkdir -p bin/win64 && cp bin/flow.exe bin/win64/flow.exe ;
cp dist/flow.zip dist/flow-win64.zip
shell: C:\cygwin\bin\bash.exe -leo pipefail '{0}'
env:
PATH: /usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
- name: Build parser test runner
run: >-
cd ${GITHUB_WORKSPACE} ;
eval $(opam env) ;
dune build src/parser/test/run_tests.exe ;
cp _build/default/src/parser/test/run_tests.exe bin/win64/run_parser_tests.exe
shell: C:\cygwin\bin\bash.exe -leo pipefail '{0}'
env:
PATH: /usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
- uses: actions/[email protected]
with:
name: build_win_bin
path: |
bin/win64/flow.exe
bin/win64/run_parser_tests.exe
- uses: actions/[email protected]
with:
name: build_win_dist
path: |
dist/flow-win64.zip
runtests_linux:
runs-on: ubuntu-latest
container:
image: node:12
needs:
- build_linux
env:
FLOW_RUNTESTS_PARALLELISM: 8
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_linux_bin
path: bin/linux
- run: chmod +x bin/linux/flow
- name: Run tests
run: ./runtests.sh bin/linux/flow | cat
runtests_macos:
runs-on: macos-latest
needs:
- build_macos
steps:
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '13.4'
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_macos_bin
path: bin/macos
- run: chmod +x bin/macos/flow
- name: Run tests
run: ./runtests.sh bin/macos/flow | cat
tool_test_linux:
runs-on: ubuntu-latest
container:
image: node:12
needs:
- build_linux
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_linux_bin
path: bin/linux
- run: chmod +x bin/linux/flow
- name: Install tool deps from yarn
run: (cd packages/flow-dev-tools && yarn install | cat)
- name: Run tool tests
run: ./tool test -p 4 --bin bin/linux/flow | cat
tool_test_macos:
runs-on: macos-latest
needs:
- build_macos
steps:
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '13.4'
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_macos_bin
path: bin/macos
- run: chmod +x bin/macos/flow
- name: Install tool deps from yarn
run: (cd packages/flow-dev-tools && yarn install | cat)
- name: Run tool tests
run: ./tool test --bin bin/macos/flow | cat
# tool_test_win:
# runs-on: windows-latest
# needs:
# - build_win
# steps:
# - uses: actions/[email protected]
# - uses: actions/[email protected]
# with:
# name: build_win_bin
# path: bin/win64
# - name: Install tool deps from yarn
# run: |-
# cd packages/flow-dev-tools
# yarn install --ignore-scripts --pure-lockfile
# - name: Run tool tests
# run: node packages/flow-dev-tools/bin/tool test --bin bin/win64/flow.exe --parallelism 1
# shell: bash
ounit_test_linux:
runs-on: ubuntu-latest
container:
image: flowtype/flow-ci:linux-x86_64
options: --user root
env:
TERM: dumb
OPAMYES: true
steps:
- uses: actions/[email protected]
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Install extra deps from opam
run: make deps-test | cat
- name: Run ounit tests
run: opam exec -- make ounit-tests-ci
- uses: actions/[email protected]
with:
path: test-results/ounit/
ounit_test_macos:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '13.4'
- name: Update curl cacerts
run: echo "cacert $GITHUB_WORKSPACE/.circleci/cacert.pem" >> ~/.curlrc
- uses: ./.github/actions/install-opam-mac
with:
arch: x86_64
- name: Create cache breaker
run: .circleci/make_opam_cachebreaker.sh > .circleci/opamcachebreaker
shell: bash
- name: opam cache
uses: actions/[email protected]
with:
path: |-
~/.opam
_opam
key: v1-opam-cache-${{ runner.arch }}-{{ hashfiles('.circleci/opamcachebreaker' }}
- name: Init opam
run: .circleci/opam_init.sh
- name: Install deps from opam
run: make deps
shell: bash
- name: Install extra deps from opam
run: make deps-test | cat
- name: Run ounit tests
run: opam exec -- make ounit-tests-ci
- uses: actions/[email protected]
with:
path: test-results/ounit/
parser_test_win:
runs-on: windows-latest
needs:
- build_win
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_win_bin
path: bin/win64
- name: Test parser
run: |-
.\bin\win64\run_parser_tests.exe .\src\parser\test\flow\
if ($LASTEXITCODE -gt 0) {
Throw "flow parser hardcoded ocaml tests exited with error code: $LASTEXITCODE"
}
.\bin\win64\run_parser_tests.exe .\src\parser\test\esprima\
if ($LASTEXITCODE -gt 0) {
Throw "flow parser esprima ocaml tests exited with error code: $LASTEXITCODE"
}
npm_pack:
runs-on: ubuntu-latest
container:
image: node:12
needs:
- build_js
- build_linux
- build_macos
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: build_js_bin
path: bin
- uses: actions/[email protected]
with:
name: build_js_dist
path: dist
- uses: actions/[email protected]
with:
name: build_js_packages
path: packages/flow-parser
- uses: actions/[email protected]
with:
name: build_linux_bin
path: bin/linux
- uses: actions/[email protected]
with:
name: build_linux_dist
path: dist
- uses: actions/[email protected]
with:
name: build_macos_bin
path: bin/macos
- uses: actions/[email protected]
with:
name: build_macos_dist
path: dist
- uses: actions/[email protected]
with:
name: build_macos_arm64_bin
path: bin/macos-arm64
- uses: actions/[email protected]
with:
name: build_macos_arm64_dist
path: dist
- name: Pack flow-parser
run: |
mkdir -p packages/flow-parser/dist/
pwd
ls -lR .
cp dist/flow_parser.js packages/flow-parser/dist/flow_parser.js
make dist/npm-flow-parser.tgz
- name: Pack flow-parser-bin
run: |
mkdir -p packages/flow-parser-bin/dist/release/
cp dist/libflowparser-linux64.zip packages/flow-parser-bin/dist/release/libflowparser-linux64.zip
cp dist/libflowparser-osx.zip packages/flow-parser-bin/dist/release/libflowparser-osx.zip
make dist/npm-flow-parser-bin.tgz
- name: Pack flow-remove-types and flow-node
run: |
rm -rf packages/flow-node
cp -r packages/flow-remove-types/ packages/flow-node/
sed -i '0,/flow-remove-types/s//flow-node/' packages/flow-node/package.json
make dist/npm-flow-remove-types.tgz
make dist/npm-flow-node.tgz
- uses: actions/[email protected]
with:
name: npm_pack
path: |
dist/npm-flow-parser.tgz
dist/npm-flow-parser-bin.tgz
dist/npm-flow-node.tgz
dist/npm-flow-remove-types.tgz
# website_deploy:
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# container:
# image: ghcr.io/facebook/flow-website:latest
# options: --user root
# needs:
# - build_linux
# - build_js
# steps:
# - uses: actions/[email protected]
# - name: Node cache
# uses: actions/[email protected]
# with:
# key: v2-node-${{ runner.arch }}-${{ github.ref_name }}-${{ hashfiles('/etc/os-release', 'website/yarn.lock') }}
# path: website/node_modules
# - name: Install yarn deps
# run: cd website && yarn install
# - name: Build website
# run: PATH=~/flow/bin/linux:$PATH .circleci/build_website.sh
# - name: Gem cache
# uses: actions/[email protected]
# with:
# key: v2-gem-${{ runner.arch }}-${{ github.ref_name }}-${{ hashfiles('/etc/os-release', 'website/Gemfile.lock') }}
# path: UPDATE_ME
# - name: Publish website to GitHub Pages
# run: |-
# cd website
# yarn add gh-pages
# yarn gh-pages -d build -u "flow-bot <[email protected]>" --repo https://${FLOW_BOT_TOKEN}@github.com/facebook/flow.git --no-history
# Deploy jobs
# npm_deploy:
# if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# container:
# image: node:12
# needs:
# - npm_pack
# steps:
# - uses: actions/[email protected]
# with:
# name: build_js_dist
# path: dist
# - name: Deploy to npm
# run: .circleci/deploy_npm.sh
# github_linux:
# if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# container:
# image: appropriate/curl:latest
# needs:
# - build_linux
# steps:
# - uses: actions/[email protected]
# with:
# name: build_linux_dist
# path: dist
# - name: Upload Linux binary
# run: .circleci/github_upload.sh dist/flow-linux64.zip "flow-linux64-${{ github.ref }}.zip"
# - name: Upload Linux libflowparser
# run: .circleci/github_upload.sh dist/libflowparser-linux64.zip "libflowparser-linux64-${{ github.ref }}.zip"
# github_macos:
# if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# container:
# image: appropriate/curl:latest
# needs:
# - build_macos
# steps:
# - uses: actions/[email protected]
# with:
# name: build_macos_dist
# path: dist
# - name: Upload Mac binary
# run: .circleci/github_upload.sh dist/flow-osx.zip "flow-osx-${{ github.ref }}.zip"
# - name: Upload Mac libflowparser
# run: .circleci/github_upload.sh dist/libflowparser-osx.zip "libflowparser-osx-${{ github.ref }}.zip"
# github_macos_arm64:
# if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# container:
# image: appropriate/curl:latest
# needs:
# - build_macos_arm64
# steps:
# - uses: actions/[email protected]
# with:
# name: build_macos_arm64_dist
# path: /flow
# - name: Upload Mac binary
# run: .circleci/github_upload.sh dist/flow-osx-arm64.zip "flow-osx-arm64-${{ github.ref }}.zip"
# - name: Upload Mac libflowparser
# run: .circleci/github_upload.sh dist/libflowparser-osx-arm64.zip "libflowparser-osx-arm64-${{ github.ref }}.zip"
github_win:
if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-latest
container:
image: appropriate/curl:latest
needs:
- build_win
steps:
- uses: actions/[email protected]
with:
name: build_win_dist
path: dist
- name: Upload Windows binary
run: .circleci/github_upload.sh dist/flow-win64.zip "flow-win64-${{ github.ref }}.zip"
flow_bin_deploy:
if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
runs-on: ubuntu-latest
container:
image: node:12
needs:
# - github_linux
# - github_macos
- github_win
steps:
- uses: actions/[email protected]
with:
name: build_linux_bin
path: ~/flow
- name: Deploy flow-bin
run: .circleci/deploy_flow_bin.sh
# try_flow_deploy:
# if: contains(github.event_name, 'push') && startsWith( github.ref, 'refs/tags/v' )
# runs-on: ubuntu-latest
# container:
# image: node:12
# needs:
# - build_js
# steps:
# - uses: actions/[email protected]
# with:
# name: build_js_bin
# path: ~/flow
# - name: Assemble files
# run: |
# cp bin/flow.js packages/try-flow-website-js/flow.js
# cp -r lib packages/try-flow-website-js/flowlib
# make dist/npm-try-flow-website-js.tgz
# - name: Deploy to NPM
# run: |
# echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
# npm publish ./dist/npm-try-flow-website-js.tgz