Check parent directory for an existing runtime #3
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 Piton binaries | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build x86 Piton binary | |
run: cargo build --verbose --release --target i686-pc-windows-msvc | |
- run: mv target/i686-pc-windows-msvc/release/piton.exe piton-win_x86.exe | |
- name: Build x64 Piton binary | |
run: cargo build --verbose --release --target x86_64-pc-windows-msvc | |
- run: mv target/x86_64-pc-windows-msvc/release/piton.exe piton-win_x64.exe | |
- name: Upload Piton binaries | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: piton-binaries | |
path: | | |
piton-win_x86.exe | |
piton-win_x64.exe | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Piton binary | |
run: cargo build --verbose --release --target x86_64-unknown-linux-gnu | |
- run: mv target/x86_64-unknown-linux-gnu/release/piton piton-linux_x64 | |
- name: Upload Piton binary | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: piton-binaries | |
path: piton-linux_x64 | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build Piton binary | |
run: cargo build --verbose --release --target x86_64-apple-darwin | |
- run: mv target/x86_64-apple-darwin/release/piton piton-macos_x64 | |
- name: Upload Piton binary | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: piton-binaries | |
path: piton-macos_x64 | |
upload-binaries: | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
needs: | |
- build-windows | |
- build-linux | |
- build-macos | |
steps: | |
- uses: actions/download-artifact@v2.1.1 | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
piton/piton-win_x86.exe | |
piton/piton-win_x64.exe | |
piton/piton-linux_x64 | |
piton/piton-macos_x64 |