@@ -41,39 +41,16 @@ jobs:
4141 - name : Check out code
4242 uses : actions/checkout@v3
4343 - name : Set up cargo
44- uses : dtolnay/ rust-toolchain@master
44+ uses : actions-rust-lang/setup- rust-toolchain@v1
4545 with :
46- toolchain : 1.63
47- - name : Cargo Cache
48- uses : Swatinem/rust-cache@v2
46+ target : aarch64-apple-darwin,x86_64-apple-darwin
4947 - name : Compile and package Volta
50- run : ./ci/build-macos-x86_64 .sh volta-macos
48+ run : ./ci/build-macos.sh volta-macos
5149 - name : Upload release artifact
5250 uses : actions/upload-artifact@v3
5351 with :
5452 name : macos
55- path : target/release/volta-macos.tar.gz
56-
57- macos-aarch64 :
58- name : Build - MacOS (ARM)
59- runs-on : macos-latest
60- steps :
61- - name : Check out code
62- uses : actions/checkout@v3
63- - name : Set up cargo
64- uses : dtolnay/rust-toolchain@master
65- with :
66- toolchain : 1.63
67- target : aarch64-apple-darwin
68- - name : Cargo Cache
69- uses : Swatinem/rust-cache@v2
70- - name : Compile and package Volta
71- run : ./ci/build-macos-arm.sh volta-macos-aarch64
72- - name : Upload release artifact
73- uses : actions/upload-artifact@v3
74- with :
75- name : macos-aarch64
76- path : target/aarch64-apple-darwin/release/volta-macos-aarch64.tar.gz
53+ path : target/universal-apple-darwin/release/volta-macos.tar.gz
7754
7855 windows :
7956 name : Build - Windows
@@ -82,34 +59,12 @@ jobs:
8259 - name : Check out code
8360 uses : actions/checkout@v3
8461 - name : Set up cargo
85- uses : dtolnay/rust-toolchain@master
86- with :
87- toolchain : 1.63
88- - name : Cargo Cache
89- uses : Swatinem/rust-cache@v2
62+ uses : actions-rust-lang/setup-rust-toolchain@v1
9063 - name : Add cargo-wix subcommand
9164 run : cargo install cargo-wix
9265 - name : Compile and package installer
9366 run : |
9467 cargo wix --nocapture --package volta --output target\wix\volta-windows.msi
95- - name : Load Certificate File
96- id : certificate_file
97- if : github.event_name == 'push'
98- uses : timheuer/base64-to-file@v1
99- with :
100- fileName : " volta-certificate.pfx"
101- encodedString : ${{ secrets.INSTALLER_CERTIFICATE }}
102- - name : Sign Installer
103- if : github.event_name == 'push'
104- env :
105- CERTIFICATE_FILE : ${{ steps.certificate_file.outputs.filePath }}
106- CERTIFICATE_PASSWORD : ${{ secrets.INSTALLER_CERTIFICATE_PASSWORD }}
107- run : |
108- & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe" sign /fd sha256 /f "$env:CERTIFICATE_FILE" /p "$env:CERTIFICATE_PASSWORD" /tr http://ts.ssl.com /td sha256 /d "Volta: Start Your Engines" /du "https://volta.sh" "target\wix\volta-windows.msi"
109- - name : Verify Signature
110- if : github.event_name == 'push'
111- run : |
112- & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe" verify /pa "target\wix\volta-windows.msi"
11368 - name : Create zip of binaries
11469 run : powershell Compress-Archive volta*.exe volta-windows.zip
11570 working-directory : ./target/release
13085 needs :
13186 - linux
13287 - macos
133- - macos-aarch64
13488 - windows
13589 if : github.event_name == 'push'
13690 steps :
@@ -151,11 +105,6 @@ jobs:
151105 with :
152106 name : macos
153107 path : release
154- - name : Fetch MacOS (ARM) artifact
155- uses : actions/download-artifact@v2
156- with :
157- name : macos-aarch64
158- path : release
159108 - name : Fetch Windows installer
160109 uses : actions/download-artifact@v2
161110 with :
@@ -195,15 +144,6 @@ jobs:
195144 asset_path : ./release/volta-macos.tar.gz
196145 asset_name : volta-${{ steps.release_info.outputs.version }}-macos.tar.gz
197146 asset_content_type : application/gzip
198- - name : Upload MacOS (ARM) artifact
199- uses : actions/upload-release-asset@v1
200- env :
201- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
202- with :
203- upload_url : ${{ steps.create_release.outputs.upload_url }}
204- asset_path : ./release/volta-macos-aarch64.tar.gz
205- asset_name : volta-${{ steps.release_info.outputs.version }}-macos-aarch64.tar.gz
206- asset_content_type : application/gzip
207147 - name : Upload Windows installer
208148 uses : actions/upload-release-asset@v1
209149 env :
0 commit comments