Skip to content

Commit 4f795bd

Browse files
committed
Update release workflow to include macos
1 parent 6650bb8 commit 4f795bd

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/release.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
os:
1414
- ubuntu-latest
1515
- windows-latest
16+
- macos-latest
1617
runs-on: ${{ matrix.os }}
1718
steps:
1819
- name: Set up Rust
@@ -29,6 +30,7 @@ jobs:
2930
os:
3031
- ubuntu-latest
3132
- windows-latest
33+
- macos-latest
3234
runs-on: ${{ matrix.os }}
3335
steps:
3436
- name: Set up Rust
@@ -44,6 +46,7 @@ jobs:
4446
os:
4547
- ubuntu-latest
4648
- windows-latest
49+
- macos-latest
4750
runs-on: ${{ matrix.os }}
4851
steps:
4952
- name: Set up Rust
@@ -58,6 +61,7 @@ jobs:
5861
os:
5962
- ubuntu-latest
6063
- windows-latest
64+
- macos-latest
6165
runs-on: ${{ matrix.os }}
6266

6367
steps:
@@ -87,21 +91,24 @@ jobs:
8791
- build: windows-msvc
8892
os: windows-latest
8993
target: x86_64-pc-windows-msvc
94+
- build: macos
95+
os: macos-latest
96+
target: aarch64-apple-darwin
9097

9198
steps:
9299
- name: Set up Rust
93100
uses: hecrj/setup-rust-action@v1
94101
- uses: actions/checkout@master
95102
- name: Set version
96103
id: set_version
97-
if: matrix.os == 'ubuntu-latest'
104+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
98105
run: echo "::set-output name=EPICK_VERSION::${GITHUB_REF#refs/tags/}"
99106
- name: Set version
100107
id: set_version_win
101108
if: matrix.os == 'windows-latest'
102109
run: echo "::set-output name=EPICK_VERSION::$(git describe --tags --abbrev=0)"
103110
- name: Set archive name
104-
if: matrix.os == 'ubuntu-latest'
111+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
105112
id: set_name
106113
run: echo "::set-output name=EPICK_ARCHIVE::epick-${{ steps.set_version.outputs.EPICK_VERSION}}-${{ matrix.target}}"
107114
- name: Set archive name
@@ -116,7 +123,7 @@ jobs:
116123
- name: Prepare archive directory
117124
run: mkdir epick
118125
- name: Move release files
119-
if: matrix.os == 'ubuntu-latest'
126+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
120127
run: |
121128
mv target/release/epick epick/
122129
- name: Move release files
@@ -128,17 +135,16 @@ jobs:
128135
mv README.md epick/
129136
mv LICENSE epick/
130137
- name: Create archives
131-
if: matrix.os == 'ubuntu-latest'
138+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
132139
run: |
133140
tar -zcvf ${{ steps.set_name.outputs.EPICK_ARCHIVE }}.tar.gz epick
134141
tar -Jcvf ${{ steps.set_name.outputs.EPICK_ARCHIVE }}.tar.xz epick
135-
7z a ${{ steps.set_name_win.outputs.EPICK_ARCHIVE }}.zip epick
136142
- name: Create archives
137143
if: matrix.os == 'windows-latest'
138144
run: |
139145
7z a ${{ steps.set_name_win.outputs.EPICK_ARCHIVE }}.zip epick
140146
- name: Upload gz
141-
if: matrix.os == 'ubuntu-latest'
147+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
142148
uses: svenstaro/upload-release-action@v2
143149
with:
144150
repo_name: wojciechkepka/epick
@@ -148,7 +154,7 @@ jobs:
148154
tag: ${{ steps.set_version.outputs.EPICK_VERSION }}
149155
overwrite: true
150156
- name: Upload xz
151-
if: matrix.os == 'ubuntu-latest'
157+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
152158
uses: svenstaro/upload-release-action@v2
153159
with:
154160
repo_name: wojciechkepka/epick

0 commit comments

Comments
 (0)