Skip to content

Commit 703b446

Browse files
committed
create release binaries for mac, linux and windows
1 parent 214d1ab commit 703b446

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

.github/workflows/release.yml

+38-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ on:
66
- "v*.*.*"
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
9+
prepare:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, macos-11, windows-2022]
13+
runs-on: ${{ matrix.os }}
1114
steps:
1215
- uses: actions/checkout@v2
1316
- uses: actions-rs/toolchain@v1
@@ -28,6 +31,38 @@ jobs:
2831
with:
2932
command: build
3033
args: --release
34+
- uses: actions/upload-artifact@v3
35+
with:
36+
name: release-binary-${{ runner.os }}
37+
path: target/release/reddownload*
38+
release:
39+
needs: [prepare]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Download Linux artifact
43+
uses: actions/download-artifact@v3
44+
with:
45+
name: release-binary-Linux
46+
path: linux
47+
- name: Download macOS artifact
48+
uses: actions/download-artifact@v3
49+
with:
50+
name: release-binary-macOS
51+
path: macos
52+
- name: Download Windows artifact
53+
uses: actions/download-artifact@v3
54+
with:
55+
name: release-binary-Windows
56+
path: windows
57+
- name: Compress files
58+
run: |
59+
tar -czf reddownload-linux.tar.gz linux/reddownload
60+
tar -czf reddownload-macos.tar.gz macos/reddownload
61+
zip -9 reddownload-windows.zip windows/reddownload.exe
3162
- uses: softprops/action-gh-release@v1
3263
with:
33-
files: target/release/reddownload
64+
files: |
65+
reddownload-linux.tar.gz
66+
reddownload-macos.tar.gz
67+
reddownload-windows.zip
68+

0 commit comments

Comments
 (0)