Update download-artifact action to v3 for macOS and Windows in releas… #325
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- "*" | |
jobs: | |
setup-and-build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source $HOME/.cargo/env | |
- name: Build macOS Binary | |
run: | | |
rustup target add x86_64-apple-darwin | |
cd utilities/earendil-gui | |
cargo build --release --target x86_64-apple-darwin --target-dir ./target | |
- name: Zip macOS Binary | |
run: | | |
zip -j earendil-macos.zip ./utilities/earendil-gui/target/x86_64-apple-darwin/release/earendil-gui | |
- name: Upload macOS Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: earendil-macos | |
path: earendil-macos.zip | |
setup-and-build-windows: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Dependencies for Windows Build | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Install Cross | |
run: cargo install cross | |
- name: Build Windows Binary with Cross | |
run: | | |
cd utilities/earendil-gui | |
cross build --target x86_64-pc-windows-gnu --release --target-dir ./target | |
- name: Zip Windows Binary | |
run: | | |
zip -j earendil-windows.zip ./utilities/earendil-gui/target/x86_64-pc-windows-gnu/release/earendil-gui.exe | |
- name: Upload Windows Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: earendil-windows | |
path: earendil-windows.zip |