You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/cd.yml
+30-7Lines changed: 30 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,12 @@ on:
6
6
- '*'
7
7
8
8
jobs:
9
-
release-osx:
10
-
runs-on: macos-latest
9
+
release:
10
+
strategy:
11
+
matrix:
12
+
os: [ubuntu-latest, macos-latest]
13
+
rust: [stable]
14
+
runs-on: ${{ matrix.os }}
11
15
steps:
12
16
- uses: actions/checkout@v2
13
17
- name: Get version
@@ -19,13 +23,19 @@ jobs:
19
23
run: make test
20
24
- name: Run clippy
21
25
run: make clippy
22
-
- name: Build Release
23
-
run: make build-release
26
+
27
+
- name: Build Release Mac
28
+
if: matrix.os == 'macos-latest'
29
+
run: make release-mac
30
+
- name: Build Release Linux
31
+
if: matrix.os == 'ubuntu-latest'
32
+
run: make release-linux
24
33
25
34
- name: Set SHA
35
+
if: matrix.os == 'macos-latest'
26
36
id: shasum
27
37
run: |
28
-
echo ::set-output name=sha::"$(shasum -a 256 ./target/gitui-mac.tar.gz | awk '{printf $1}')"
38
+
echo ::set-output name=sha::"$(shasum -a 256 ./release/gitui-mac.tar.gz | awk '{printf $1}')"
29
39
30
40
- name: Create Release
31
41
id: create_release
@@ -39,16 +49,29 @@ jobs:
39
49
prerelease: true
40
50
41
51
- name: Upload Release Asset
52
+
if: matrix.os == 'macos-latest'
42
53
uses: actions/upload-release-asset@v1
43
54
env:
44
55
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45
56
with:
46
-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
0 commit comments