Skip to content

Commit

Permalink
Try for parameterized release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceadams committed Apr 8, 2020
1 parent 119fb35 commit e987b4e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 43 deletions.
64 changes: 22 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,42 @@ env:
GITHUB_TOKEN: ${{ github.token }}

jobs:
macos:
runs-on: macos-latest
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macos-latest
path: ./target/release/yj
name: yj.macos
- os: ubuntu-latest
path: ./target/x86_64-unknown-linux-musl/release/yj
name: yj.linux
- os: windows-latest
path: ./target/release/yj.exe
name: yj.exe

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
- name: Build
run: cargo build --release --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./target/release/yj
asset_name: yj.macos
asset_content_type: application/octet-stream

linux:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
- name: Build
- name: Update
run: rustup update
- name: MUSL
if: runner.os == 'Linux'
run: |
sudo apt-get install musl-tools
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./target/x86_64-unknown-linux-musl/release/yj
asset_name: yj.linux
asset_content_type: application/octet-stream

windows:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
- name: Build
run: cargo build --release --verbose
- name: Upload Release Asset
uses: actions/[email protected]
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./target/release/yj.exe
asset_name: yj.exe
asset_path: ${{ matrix.path }}
asset_name: yj.${{ matrix.name }}
asset_content_type: application/octet-stream
5 changes: 4 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v1
- name: Checkout
uses: actions/checkout@v1
- name: Update
run: rustup update
- name: Build
run: cargo build --verbose
- name: Clippy
Expand Down

0 comments on commit e987b4e

Please sign in to comment.