Add windows-msvc cargo build target to GitHub Actions (#86)

This commit is contained in:
Spencer Woo 2020-06-13 21:35:54 +08:00 committed by GitHub
parent 1ce74baf3b
commit 5864cd5564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,10 +34,24 @@ jobs:
name: "zoxide-x86_64-apple-darwin"
path: "target/x86_64-apple-darwin/release/zoxide"
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --target x86_64-pc-windows-msvc
- uses: actions/upload-artifact@v1.0.0
with:
name: "zoxide-x86_64-pc-windows-msvc.exe"
path: "target/x86_64-pc-windows-msvc/release/zoxide.exe"
release-upload:
needs:
- build-linux
- build-darwin
- build-windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
@ -96,3 +110,15 @@ jobs:
asset_path: "zoxide-x86_64-apple-darwin/zoxide"
asset_name: "zoxide-x86_64-apple-darwin"
asset_content_type: application/octet-stream
- uses: actions/download-artifact@v1
with:
name: "zoxide-x86_64-pc-windows-msvc.exe"
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: "zoxide-x86_64-pc-windows-msvc/zoxide"
asset_name: "zoxide-x86_64-pc-windows-msvc.exe"
asset_content_type: application/octet-stream