Skip to content

Commit

Permalink
Fix windows release.
Browse files Browse the repository at this point in the history
  • Loading branch information
piobab committed Nov 23, 2020
1 parent f96070d commit 8216dc8
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

jobs:
release:
unix-release:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -18,9 +18,6 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl

- os: windows-latest
target: x86_64-pc-windows-msvc

- os: macos-latest
target: x86_64-apple-darwin

Expand All @@ -44,7 +41,6 @@ jobs:
run: cargo build --release --locked

- name: Strip binary
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: strip target/release/cleora

- name: Upload binaries to release
Expand All @@ -53,4 +49,42 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/cleora
asset_name: cleora-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}
tag: ${{ github.ref }}

windows-release:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set the version
id: version
run: |
$TAG=${env:GITHUB_REF} -replace 'refs/tags/', ''
echo "::set-output name=VERSION::$TAG"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Build
run: cargo build --release --locked

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/cleora.exe
asset_name: cleora-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}
tag: ${{ github.ref }}

0 comments on commit 8216dc8

Please sign in to comment.