-
Notifications
You must be signed in to change notification settings - Fork 86
1167 lines (1123 loc) · 48.2 KB
/
release.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
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Build and Release
on:
push:
tags:
- 'v*'
permissions: write-all
jobs:
build-juliaup:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
label: [
x86_64-pc-windows-msvc-windowsstore,
x86_64-pc-windows-msvc-windowsappinstaller,
x86_64-pc-windows-gnu-msi,
x86_64-pc-windows-gnu-portable,
x86_64-apple-darwin,
x86_64-apple-darwin-portable,
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
x86_64-unknown-linux-musl-portable,
i686-pc-windows-msvc-windowsstore,
i686-pc-windows-msvc-windowsappinstaller,
i686-pc-windows-gnu-msi,
i686-pc-windows-gnu-portable,
i686-unknown-linux-gnu,
i686-unknown-linux-musl,
i686-unknown-linux-musl-portable,
aarch64-unknown-linux-gnu,
aarch64-unknown-linux-musl,
aarch64-unknown-linux-musl-portable,
aarch64-apple-darwin,
aarch64-apple-darwin-portable
]
include:
- label: x86_64-pc-windows-msvc-windowsstore
target: x86_64-pc-windows-msvc
bins: --bin juliaup --bin julialauncher
os: windows
features: windowsstore,binjulialauncher
rustflags:
toolchain: stable
- label: x86_64-pc-windows-msvc-windowsappinstaller
target: x86_64-pc-windows-msvc
bins: --bin juliaup --bin julialauncher
os: windows
features: windowsappinstaller,binjulialauncher
rustflags:
toolchain: stable
- label: x86_64-pc-windows-gnu-msi
target: x86_64-pc-windows-gnu
bins: --bin juliaup --bin julialauncher
os: windows
features: binjulialauncher
rustflags:
toolchain: stable-gnu
- label: x86_64-pc-windows-gnu-portable
target: x86_64-pc-windows-gnu
bins: --bin juliaup --bin julia
os: windows
features: dummy
rustflags:
toolchain: stable-gnu
- label: i686-pc-windows-gnu-msi
target: i686-pc-windows-gnu
bins: --bin juliaup --bin julialauncher
os: windows
features: binjulialauncher
rustflags:
toolchain: stable-i686-gnu
- label: i686-pc-windows-gnu-portable
target: i686-pc-windows-gnu
bins: --bin juliaup --bin julia
os: windows
features: dummy
rustflags:
toolchain: stable-i686-gnu
- label: x86_64-apple-darwin
target: x86_64-apple-darwin
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: macos
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags:
toolchain: stable
- label: x86_64-apple-darwin-portable
target: x86_64-apple-darwin
bins: --bin juliaup --bin julia
os: macos
features: dummy
rustflags:
toolchain: stable
- label: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags:
toolchain: stable
- label: x86_64-unknown-linux-musl
target: x86_64-unknown-linux-musl
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: x86_64-unknown-linux-musl-portable
target: x86_64-unknown-linux-musl
bins: --bin juliaup --bin julia
os: ubuntu
features: dummy
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: i686-pc-windows-msvc-windowsstore
target: i686-pc-windows-msvc
bins: --bin juliaup --bin julialauncher
os: windows
features: windowsstore,binjulialauncher
rustflags:
toolchain: stable
- label: i686-pc-windows-msvc-windowsappinstaller
target: i686-pc-windows-msvc
bins: --bin juliaup --bin julialauncher
os: windows
features: windowsappinstaller,binjulialauncher
rustflags:
toolchain: stable
- label: i686-unknown-linux-gnu
target: i686-unknown-linux-gnu
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags:
toolchain: stable
- label: i686-unknown-linux-musl
target: i686-unknown-linux-musl
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: i686-unknown-linux-musl-portable
target: i686-unknown-linux-musl
bins: --bin juliaup --bin julia
os: ubuntu
features: dummy
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: aarch64-unknown-linux-gnu
target: aarch64-unknown-linux-gnu
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags:
toolchain: stable
- label: aarch64-unknown-linux-musl
target: aarch64-unknown-linux-musl
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: ubuntu
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: aarch64-unknown-linux-musl-portable
target: aarch64-unknown-linux-musl
bins: --bin juliaup --bin julia
os: ubuntu
features: dummy
rustflags: -C target-feature=+crt-static
toolchain: stable
- label: aarch64-apple-darwin
target: aarch64-apple-darwin
bins: --bin juliaup --bin julialauncher --bin juliainstaller
os: macos
features: selfupdate,binjuliainstaller,binjulialauncher
rustflags:
toolchain: stable
- label: aarch64-apple-darwin-portable
target: aarch64-apple-darwin
bins: --bin juliaup --bin julia
os: macos
features: dummy
rustflags:
toolchain: stable
steps:
- uses: actions/checkout@v4
- if: ${{ contains(matrix.target, '-musl') }}
run: sudo apt-get install musl-tools
- uses: egor-tensin/setup-mingw@v2
if: ${{ contains(matrix.toolchain, 'stable-i686-gnu') }}
with:
platform: x86
version: 12.2.0
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{matrix.toolchain}}
target: ${{matrix.target}}
- name: Release build
uses: clechasseur/rs-cargo@v2
with:
command: build
use-cross: ${{ matrix.os == 'ubuntu' }}
args: --release ${{matrix.bins}} --target ${{matrix.target}} --features ${{matrix.features}}
env:
CARGO_TARGET_x86_64-unknown-linux-musl: ${{matrix.rustflags}}
CARGO_TARGET_i686-unknown-linux-musl: ${{matrix.rustflags}}
CARGO_TARGET_aarch64-unknown-linux-musl: ${{matrix.rustflags}}
- uses: actions/upload-artifact@v4
with:
name: juliaup-${{matrix.label}}
path: |
target/${{matrix.target}}/release/juliaup
target/${{matrix.target}}/release/julialauncher
target/${{matrix.target}}/release/julia
target/${{matrix.target}}/release/juliaup.exe
target/${{matrix.target}}/release/julialauncher.exe
target/${{matrix.target}}/release/julia.exe
- uses: actions/upload-artifact@v4
if: ${{ contains(matrix.bins, 'juliainstaller') }}
with:
name: juliainstaller-${{matrix.label}}
path: |
target/${{matrix.target}}/release/juliainstaller
target/${{matrix.target}}/release/juliainstaller.exe
test-juliaup:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
target: [
x86_64-pc-windows-msvc,
x86_64-apple-darwin,
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
i686-pc-windows-msvc,
]
include:
- target: x86_64-pc-windows-msvc
os: windows
features: dummy,binjulialauncher
rustflags:
toolchain: stable
- target: x86_64-pc-windows-gnu
os: windows
features: dummy,binjulialauncher
rustflags:
toolchain: stable-gnu
- target: x86_64-apple-darwin
os: macos
features: dummy,binjulialauncher
rustflags:
toolchain: stable
- target: x86_64-unknown-linux-gnu
os: ubuntu
features: dummy,binjulialauncher
rustflags:
toolchain: stable
- target: x86_64-unknown-linux-musl
os: ubuntu
features: dummy,binjulialauncher
rustflags: -C target-feature=+crt-static
toolchain: stable
- target: i686-pc-windows-msvc
os: windows
features: dummy,binjulialauncher
rustflags:
toolchain: stable
- target: i686-pc-windows-gnu
os: windows
features: dummy,binjulialauncher
rustflags:
toolchain: stable-i686-gnu
steps:
- uses: actions/checkout@v4
- if: ${{ contains(matrix.target, '-musl') }}
run: sudo apt-get install musl-tools
- uses: egor-tensin/setup-mingw@v2
if: ${{ contains(matrix.toolchain, 'stable-i686-gnu') }}
with:
platform: x86
version: 12.2.0
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{matrix.toolchain}}
target: ${{matrix.target}}
- name: Test
uses: clechasseur/rs-cargo@v2
with:
command: test
use-cross: ${{ matrix.os == 'ubuntu' }}
args: --target ${{matrix.target}} --features ${{matrix.features}}
env:
CARGO_TARGET_x86_64-unknown-linux-musl: ${{matrix.rustflags}}
CARGO_TARGET_i686-unknown-linux-musl: ${{matrix.rustflags}}
CARGO_TARGET_aarch64-unknown-linux-musl: ${{matrix.rustflags}}
package-mac-linux:
needs: [build-juliaup,test-juliaup]
environment: package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Linux x64 juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-unknown-linux-gnu
path: target/x86_64-unknown-linux-gnu
- name: Download Linux x64 musl juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-unknown-linux-musl
path: target/x86_64-unknown-linux-musl
- name: Download Linux x86 juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-unknown-linux-gnu
path: target/i686-unknown-linux-gnu
- name: Download Linux x86 musl juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-unknown-linux-musl
path: target/i686-unknown-linux-musl
- name: Download MacOS x64 juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-apple-darwin
path: target/x86_64-apple-darwin
- name: Download MacOS aarch64 juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-aarch64-apple-darwin
path: target/aarch64-apple-darwin
- name: Download Linux aarch64 juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-aarch64-unknown-linux-gnu
path: target/aarch64-unknown-linux-gnu
- name: Download Linux aarch64 musl juliaup artifact
uses: actions/download-artifact@v4
with:
name: juliaup-aarch64-unknown-linux-musl
path: target/aarch64-unknown-linux-musl
- name: Download installer artifacts for x86_64-apple-darwin
uses: actions/download-artifact@v4
with:
name: juliainstaller-x86_64-apple-darwin
path: target/installer/x86_64-apple-darwin
- name: Download installer artifacts for x86_64-unknown-linux-gnu
uses: actions/download-artifact@v4
with:
name: juliainstaller-x86_64-unknown-linux-gnu
path: target/installer/x86_64-unknown-linux-gnu
- name: Download installer artifacts for x86_64-unknown-linux-musl
uses: actions/download-artifact@v4
with:
name: juliainstaller-x86_64-unknown-linux-musl
path: target/installer/x86_64-unknown-linux-musl
- name: Download installer artifacts for i686-unknown-linux-gnu
uses: actions/download-artifact@v4
with:
name: juliainstaller-i686-unknown-linux-gnu
path: target/installer/i686-unknown-linux-gnu
- name: Download installer artifacts for i686-unknown-linux-musl
uses: actions/download-artifact@v4
with:
name: juliainstaller-i686-unknown-linux-musl
path: target/installer/i686-unknown-linux-musl
- name: Download installer artifacts for aarch64-unknown-linux-gnu
uses: actions/download-artifact@v4
with:
name: juliainstaller-aarch64-unknown-linux-gnu
path: target/installer/aarch64-unknown-linux-gnu
- name: Download installer artifacts for aarch64-unknown-linux-musl
uses: actions/download-artifact@v4
with:
name: juliainstaller-aarch64-unknown-linux-musl
path: target/installer/aarch64-unknown-linux-musl
- name: Download installer artifacts for aarch64-apple-darwin
uses: actions/download-artifact@v4
with:
name: juliainstaller-aarch64-apple-darwin
path: target/installer/aarch64-apple-darwin
- name: Set permissions
run: |
chmod a+rx target/x86_64-unknown-linux-gnu/juliaup
chmod a+rx target/x86_64-unknown-linux-gnu/julialauncher
chmod a+rx target/x86_64-unknown-linux-musl/juliaup
chmod a+rx target/x86_64-unknown-linux-musl/julialauncher
chmod a+rx target/i686-unknown-linux-gnu/juliaup
chmod a+rx target/i686-unknown-linux-gnu/julialauncher
chmod a+rx target/i686-unknown-linux-musl/juliaup
chmod a+rx target/i686-unknown-linux-musl/julialauncher
chmod a+rx target/x86_64-apple-darwin/juliaup
chmod a+rx target/x86_64-apple-darwin/julialauncher
chmod a+rx target/aarch64-apple-darwin/juliaup
chmod a+rx target/aarch64-apple-darwin/julialauncher
chmod a+rx target/aarch64-unknown-linux-gnu/juliaup
chmod a+rx target/aarch64-unknown-linux-gnu/julialauncher
chmod a+rx target/aarch64-unknown-linux-musl/juliaup
chmod a+rx target/aarch64-unknown-linux-musl/julialauncher
- name: Export version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
echo "VERSION=$VERSION" >> $GITHUB_ENV
env:
GH_REF: ${{ github.ref }}
- name: Create archives
run: |
mkdir public
mkdir public/bin
cd target/x86_64-unknown-linux-gnu
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-x86_64-unknown-linux-gnu.tar.gz .
cd ../../target/x86_64-unknown-linux-musl
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-x86_64-unknown-linux-musl.tar.gz .
cd ../../target/i686-unknown-linux-gnu
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-i686-unknown-linux-gnu.tar.gz .
cd ../../target/i686-unknown-linux-musl
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-i686-unknown-linux-musl.tar.gz .
cd ../../target/x86_64-apple-darwin
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-x86_64-apple-darwin.tar.gz .
cd ../../target/aarch64-apple-darwin
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-aarch64-apple-darwin.tar.gz .
cd ../../target/aarch64-unknown-linux-gnu
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-aarch64-unknown-linux-gnu.tar.gz .
cd ../../target/aarch64-unknown-linux-musl
tar -czvf ../../public/bin/juliaup-${{ env.VERSION }}-aarch64-unknown-linux-musl.tar.gz .
cd ../..
- name: Rename and move juliainstaller
run: |
mv target/installer/x86_64-apple-darwin/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-x86_64-apple-darwin
mv target/installer/x86_64-unknown-linux-gnu/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-x86_64-unknown-linux-gnu
mv target/installer/x86_64-unknown-linux-musl/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-x86_64-unknown-linux-musl
mv target/installer/i686-unknown-linux-gnu/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-i686-unknown-linux-gnu
mv target/installer/i686-unknown-linux-musl/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-i686-unknown-linux-musl
mv target/installer/aarch64-unknown-linux-gnu/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-aarch64-unknown-linux-gnu
mv target/installer/aarch64-unknown-linux-musl/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-aarch64-unknown-linux-musl
mv target/installer/aarch64-apple-darwin/juliainstaller public/bin/juliainstaller-${{ env.VERSION }}-aarch64-apple-darwin
- name: Upload to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --cache-control public,max-age=2678400 --metadata-directive REPLACE
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'public'
package-mac-linux-portable:
needs: [build-juliaup,test-juliaup]
environment: package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download x86_64-apple-darwin-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-apple-darwin-portable
path: target/x86_64-apple-darwin-portable
- name: Download x86_64-unknown-linux-musl-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-unknown-linux-musl-portable
path: target/x86_64-unknown-linux-musl-portable
- name: Download i686-unknown-linux-musl-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-unknown-linux-musl-portable
path: target/i686-unknown-linux-musl-portable
- name: Download aarch64-unknown-linux-musl-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-aarch64-unknown-linux-musl-portable
path: target/aarch64-unknown-linux-musl-portable
- name: Download aarch64-apple-darwin-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-aarch64-apple-darwin-portable
path: target/aarch64-apple-darwin-portable
- name: Set permissions
run: |
chmod a+rx target/x86_64-apple-darwin-portable/juliaup
chmod a+rx target/x86_64-apple-darwin-portable/julia
chmod a+rx target/x86_64-unknown-linux-musl-portable/juliaup
chmod a+rx target/x86_64-unknown-linux-musl-portable/julia
chmod a+rx target/i686-unknown-linux-musl-portable/juliaup
chmod a+rx target/i686-unknown-linux-musl-portable/julia
chmod a+rx target/aarch64-unknown-linux-musl-portable/juliaup
chmod a+rx target/aarch64-unknown-linux-musl-portable/julia
chmod a+rx target/aarch64-apple-darwin-portable/juliaup
chmod a+rx target/aarch64-apple-darwin-portable/julia
- name: Export version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
echo "VERSION=$VERSION" >> $GITHUB_ENV
env:
GH_REF: ${{ github.ref }}
- name: Create archives
run: |
mkdir public
cd target/x86_64-apple-darwin-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-x86_64-apple-darwin-portable.tar.gz .
cd ../../target/x86_64-unknown-linux-musl-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-x86_64-unknown-linux-musl-portable.tar.gz .
cd ../../target/i686-unknown-linux-musl-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-i686-unknown-linux-musl-portable.tar.gz .
cd ../../target/aarch64-unknown-linux-musl-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-aarch64-unknown-linux-musl-portable.tar.gz .
cd ../../target/aarch64-apple-darwin-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-aarch64-apple-darwin-portable.tar.gz .
cd ../..
- uses: actions/upload-artifact@v4
with:
name: portable-mac-linux
path: public/*.*
package-windows-portable:
needs: [build-juliaup,test-juliaup]
environment: package
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download x86_64-pc-windows-gnu-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-pc-windows-gnu-portable
path: target/x86_64-pc-windows-gnu-portable
- name: Download i686-pc-windows-gnu-portable artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-pc-windows-gnu-portable
path: target/i686-pc-windows-gnu-portable
- name: Export version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: bash
env:
GH_REF: ${{ github.ref }}
- name: 'Azure CLI login with federated credential'
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREKEYVAULTCLIENTID }}
tenant-id: ${{ secrets.AZUREKEYVAULTTENANTID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Sign Windows x64 files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\x86_64-pc-windows-gnu-portable
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Sign Windows x86 files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\i686-pc-windows-gnu-portable
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Create archives
shell: bash
run: |
mkdir public
cd target/x86_64-pc-windows-gnu-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-x86_64-pc-windows-gnu-portable.tar.gz .
cd ../../target/i686-pc-windows-gnu-portable
tar -czvf ../../public/juliaup-${{ env.VERSION }}-i686-pc-windows-gnu-portable.tar.gz .
cd ../..
- uses: actions/upload-artifact@v4
with:
name: portable-windows
path: public/*.*
package-windows-msix:
needs: [build-juliaup,test-juliaup]
runs-on: windows-latest
environment: package
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Force old Powershell version
shell: cmd
run: |
set "extractPath=C:\Program Files\PowerShell\7"
curl -sLO https://github.com/PowerShell/PowerShell/releases/download/v7.2.17/PowerShell-7.2.17-win-x64.zip
RMDIR "%extractPath%" /S /Q
7z x PowerShell-7.2.17-win-x64.zip -o"%extractPath%"
pwsh --version
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-msix
run: cargo install cargo-msix
- name: Install StoreBroker
run: Install-Module -Name StoreBroker -Force
- name: Download and extract bundled Julia versions
run: |
$x64Versions = Get-Content versiondb\versiondb-x86_64-pc-windows-msvc.json | ConvertFrom-Json
$x64VersionFromChannel = $x64Versions.AvailableChannels.release.Version
$x64DownloadUrl = $x64Versions.AvailableVersions.$x64VersionFromChannel.UrlPath
$x64Filename = Split-Path $x64DownloadUrl -leaf
$x86Versions = Get-Content versiondb\versiondb-i686-pc-windows-msvc.json | ConvertFrom-Json
$x86VersionFromChannel = $x86Versions.AvailableChannels.release.Version
$x86DownloadUrl = $x86Versions.AvailableVersions.$x86VersionFromChannel.UrlPath
$x86Filename = Split-Path $x86DownloadUrl -leaf
mkdir -Force target\bundledjulia\downloads
mkdir -Force target\bundledjulia\extracted\x64
mkdir -Force target\bundledjulia\extracted\x86
Invoke-WebRequest "https://julialang-s3.julialang.org/$x64DownloadUrl" -OutFile "target\bundledjulia\downloads\$x64Filename"
tar -xvzf "target\bundledjulia\downloads\$x64Filename" -C target\bundledjulia\extracted\x64 --strip-components=1
Invoke-WebRequest "https://julialang-s3.julialang.org/$x86DownloadUrl" -OutFile "target\bundledjulia\downloads\$x86Filename"
tar -xvzf "target\bundledjulia\downloads\$x86Filename" -C target\bundledjulia\extracted\x86 --strip-components=1
- name: Download x86 Juliaup Windows Store artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-pc-windows-msvc-windowsstore
path: target\windowsstore\i686-pc-windows-msvc\release
- name: Download x64 Juliaup Windows Store artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-pc-windows-msvc-windowsstore
path: target\windowsstore\x86_64-pc-windows-msvc\release
- name: Download x86 Juliaup Windows AppInstaller artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-pc-windows-msvc-windowsappinstaller
path: target\winappinstaller\i686-pc-windows-msvc\release
- name: Download x64 Juliaup Windows AppInstaller artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-pc-windows-msvc-windowsappinstaller
path: target\winappinstaller\x86_64-pc-windows-msvc\release
- name: 'Azure CLI login with federated credential'
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREKEYVAULTCLIENTID }}
tenant-id: ${{ secrets.AZUREKEYVAULTTENANTID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Sign Store binary files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\windowsstore
files-folder-recurse: true
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Sign Appinstaller binary files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\winappinstaller
files-folder-recurse: true
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Build MSIX Windows Store
run: cargo msix --release --bundle-name winstoremsix --source-build-output-path ${{ format('{0}/target/windowsstore', github.workspace) }}
- name: Build MSIX App Installer
run: cargo msix --release --bundle-name winappinstallermsix --source-build-output-path ${{ format('{0}/target/winappinstaller', github.workspace) }}
- name: Sign msix files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\msix\winappinstallermsix
# files-folder-filter:
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Package Windows Store payload
run: |
md (Join-Path $env:GITHUB_WORKSPACE "storepackage")
New-SubmissionPackage -ConfigPath (Join-Path $env:GITHUB_WORKSPACE "deploy" "winstoresubmission" "SBConfig.json") -PDPRootPath (Join-Path $env:GITHUB_WORKSPACE "deploy" "winstoresubmission" "pdps") -ImagesRootPath (Join-Path $env:GITHUB_WORKSPACE "deploy" "winstoresubmission" "images") -AppxPath target\msix\winstoremsix\*.appxbundle -OutPath (Join-Path $env:GITHUB_WORKSPACE "storepackage") -OutName Upload
- name: Rename and move juliainstaller
run: |
md public/winappinstaller
Move-Item target/msix/winappinstallermsix/* public/winappinstaller
- name: Upload to S3
run: |
aws s3 sync public s3://${{ secrets.AWS_S3_BUCKET }}/ --acl public-read --cache-control public,max-age=2678400 --metadata-directive REPLACE --region us-east-1 --no-progress
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- uses: actions/upload-artifact@v4
with:
name: storepackage
path: storepackage\*.*
- uses: actions/upload-artifact@v4
with:
name: winappinstaller
path: target\msix\winappinstaller\Julia.appinstaller
package-windows-msi:
needs: [build-juliaup,test-juliaup]
runs-on: windows-latest
environment: package
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Install Wix
run: dotnet tool install --global wix --version 4.0.4
- name: Install Wix UI extensions
run: wix extension add -g WixToolset.UI.wixext/4.0.4
- name: Download x86 Juliaup Windows MSI artifact
uses: actions/download-artifact@v4
with:
name: juliaup-i686-pc-windows-gnu-msi
path: target\msi\i686-pc-windows-gnu\release
- name: Download x64 Juliaup Windows MSI artifact
uses: actions/download-artifact@v4
with:
name: juliaup-x86_64-pc-windows-gnu-msi
path: target\msi\x86_64-pc-windows-gnu\release
- name: Copy artifacts file
run: |
Copy-Item ./deploy/msi/Bitmaps target\msi\x86_64-pc-windows-gnu\release\ -Recurse
Copy-Item ./deploy/msi/Bitmaps target\msi\i686-pc-windows-gnu\release\ -Recurse
- name: Export version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: bash
env:
GH_REF: ${{ github.ref }}
- name: 'Azure CLI login with federated credential'
uses: azure/login@v2
with:
client-id: ${{ secrets.AZUREKEYVAULTCLIENTID }}
tenant-id: ${{ secrets.AZUREKEYVAULTTENANTID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Sign x64 binary files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\msi\x86_64-pc-windows-gnu\release
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Sign x86 binary files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\msi\i686-pc-windows-gnu\release
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Build MSI
run: |
wix build -ext WixToolset.UI.wixext .\deploy\msi\Julia.wxs -b .\target\msi\x86_64-pc-windows-gnu\release\ -arch x64 -o target\msi\Julia-v${{ env.VERSION }}-x64.msi -d ${{ env.VERSION }}
wix build -ext WixToolset.UI.wixext .\deploy\msi\Julia.wxs -b .\target\msi\i686-pc-windows-gnu\release\ -arch x86 -o target\msi\Julia-v${{ env.VERSION }}-x86.msi -d ${{ env.VERSION }}
- name: Sign MSI files
uses: azure/[email protected]
with:
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: juliahubwincertsaccount
certificate-profile-name: JuliaHubWinCert
files-folder: ${{ github.workspace }}\target\msi
files-folder-filter: msi
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- uses: actions/upload-artifact@v4
with:
name: msiinstallers
path: target\msi\Julia*.msi
- name: Rename and move MSI installer
run: |
md public/winmsi
Move-Item target/msi/Julia*.msi public/winmsi
- name: Upload to S3
run: |
aws s3 sync public s3://${{ secrets.AWS_S3_BUCKET }}/ --acl public-read --cache-control public,max-age=2678400 --metadata-directive REPLACE --region us-east-1 --no-progress
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
create-github-release:
needs: [test-juliaup]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
generateReleaseNotes: true
deploy-github-release-binaries:
needs: [create-github-release, package-mac-linux-portable, package-windows-portable]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: portable-mac-linux
path: public
- uses: actions/download-artifact@v4
with:
name: portable-windows
path: public
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "public/*.*"
allowUpdates: true
prerelease: true
deploy-dev-channel-winstore:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: dev-channel
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Force old Powershell version
shell: cmd
run: |
set "extractPath=C:\Program Files\PowerShell\7"
curl -sLO https://github.com/PowerShell/PowerShell/releases/download/v7.2.17/PowerShell-7.2.17-win-x64.zip
RMDIR "%extractPath%" /S /Q
7z x PowerShell-7.2.17-win-x64.zip -o"%extractPath%"
pwsh --version
- name: Install StoreBroker
run: Install-Module -Name StoreBroker -Force
- uses: actions/download-artifact@v4
with:
name: storepackage
- name: Authenticate with store
env:
TENANTID: ${{ secrets.TENANTID }}
CLIENTID: ${{ secrets.CLIENTID }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET }}
run: |
$sec = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential $env:CLIENTID, $sec
Set-StoreBrokerAuthentication -TenantId $env:TENANTID -Credential $cred
Update-ApplicationFlightSubmission -ReplacePackages -AppId 9NJNWW8PVKMN -FlightId 2e2f9fe8-3950-4273-b80d-7f752296ca86 -SubmissionDataPath ".\Upload.json" -PackagePath ".\Upload.zip" -AutoCommit -Force
deploy-releasepreview-channel-winstore:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: release-preview-channel
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Force old Powershell version
shell: cmd
run: |
set "extractPath=C:\Program Files\PowerShell\7"
curl -sLO https://github.com/PowerShell/PowerShell/releases/download/v7.2.17/PowerShell-7.2.17-win-x64.zip
RMDIR "%extractPath%" /S /Q
7z x PowerShell-7.2.17-win-x64.zip -o"%extractPath%"
pwsh --version
- name: Install StoreBroker
run: Install-Module -Name StoreBroker -Force
- uses: actions/download-artifact@v4
with:
name: storepackage
- name: Authenticate with store
env:
TENANTID: ${{ secrets.TENANTID }}
CLIENTID: ${{ secrets.CLIENTID }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET }}
run: |
$sec = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential $env:CLIENTID, $sec
Set-StoreBrokerAuthentication -TenantId $env:TENANTID -Credential $cred
Update-ApplicationFlightSubmission -ReplacePackages -AppId 9NJNWW8PVKMN -FlightId 732b234a-7ea9-4b65-8c9f-b9d9eaefb578 -SubmissionDataPath ".\Upload.json" -PackagePath ".\Upload.zip" -AutoCommit -Force
deploy-release-channel-winstore:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: release-channel
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Force old Powershell version
shell: cmd
run: |
set "extractPath=C:\Program Files\PowerShell\7"
curl -sLO https://github.com/PowerShell/PowerShell/releases/download/v7.2.17/PowerShell-7.2.17-win-x64.zip
RMDIR "%extractPath%" /S /Q
7z x PowerShell-7.2.17-win-x64.zip -o"%extractPath%"
pwsh --version
- name: Install StoreBroker
run: Install-Module -Name StoreBroker -Force
- uses: actions/download-artifact@v4
with:
name: storepackage
- name: Authenticate with store
env:
TENANTID: ${{ secrets.TENANTID }}
CLIENTID: ${{ secrets.CLIENTID }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET }}
run: |
$sec = ConvertTo-SecureString $env:CLIENTSECRET -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential $env:CLIENTID, $sec
Set-StoreBrokerAuthentication -TenantId $env:TENANTID -Credential $cred
Update-ApplicationSubmission -ReplacePackages -AppId 9NJNWW8PVKMN -SubmissionDataPath ".\Upload.json" -PackagePath ".\Upload.zip" -AutoCommit -Force
deploy-release-channel-brew:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: release-channel
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
token: ${{secrets.TOKEN_FOR_HOMEBREW}}
formula: juliaup
force: true
deploy-release-channel-aur:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: release-preview-channel
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout PKGBUILD repo
run: |
echo "$AUR_SSH_KEY" > ~/aur_ssh_key
chmod 600 ~/aur_ssh_key
git config --global core.sshCommand "ssh -i ~/aur_ssh_key -o 'StrictHostKeyChecking=no'"
git clone "[email protected]:juliaup.git" .
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
- name: Update version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
sed -i "s/^pkgver=.*\$/pkgver=${VERSION}/g" PKGBUILD
sed -i "s/^pkgrel=.*\$/pkgrel=1/g" PKGBUILD
env:
GH_REF: ${{ github.ref }}
- name: Update .SRCINFO and checksum
uses: heyhusen/[email protected]
with:
flags: ''
namcap: false
updpkgsums: true
srcinfo: true
- name: Commit and push changes
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
git config --global user.email "[email protected]"
git config --global user.name 'Your friendly Juliaup bot'
git commit -a -m "Version ${VERSION} (automated version bump)"
git push origin master
env:
GH_REF: ${{ github.ref }}
deploy-dev-channel-s3:
needs: [create-github-release,package-mac-linux,package-windows-msix,package-windows-msi]
environment: dev-channel
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4