Skip to content

Commit 8216dc8

Browse files
committed
Fix windows release.
1 parent f96070d commit 8216dc8

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- '*'
77

88
jobs:
9-
release:
9+
unix-release:
1010
name: ${{ matrix.target }}
1111
runs-on: ${{ matrix.os }}
1212
strategy:
@@ -18,9 +18,6 @@ jobs:
1818
- os: ubuntu-latest
1919
target: x86_64-unknown-linux-musl
2020

21-
- os: windows-latest
22-
target: x86_64-pc-windows-msvc
23-
2421
- os: macos-latest
2522
target: x86_64-apple-darwin
2623

@@ -44,7 +41,6 @@ jobs:
4441
run: cargo build --release --locked
4542

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

5046
- name: Upload binaries to release
@@ -53,4 +49,42 @@ jobs:
5349
repo_token: ${{ secrets.GITHUB_TOKEN }}
5450
file: target/release/cleora
5551
asset_name: cleora-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}
52+
tag: ${{ github.ref }}
53+
54+
windows-release:
55+
name: ${{ matrix.target }}
56+
runs-on: ${{ matrix.os }}
57+
strategy:
58+
matrix:
59+
include:
60+
- os: windows-latest
61+
target: x86_64-pc-windows-msvc
62+
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v2
66+
67+
- name: Set the version
68+
id: version
69+
run: |
70+
$TAG=${env:GITHUB_REF} -replace 'refs/tags/', ''
71+
echo "::set-output name=VERSION::$TAG"
72+
73+
- name: Install Rust
74+
uses: actions-rs/toolchain@v1
75+
with:
76+
toolchain: stable
77+
profile: minimal
78+
override: true
79+
target: ${{ matrix.target }}
80+
81+
- name: Build
82+
run: cargo build --release --locked
83+
84+
- name: Upload binaries to release
85+
uses: svenstaro/upload-release-action@v1-release
86+
with:
87+
repo_token: ${{ secrets.GITHUB_TOKEN }}
88+
file: target/release/cleora.exe
89+
asset_name: cleora-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}
5690
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)