Skip to content

Commit 45c217b

Browse files
committed
ci: add macos to release matrix
Signed-off-by: Rick Elrod <rick.elrod@checkmk.com>
1 parent 98d7b10 commit 45c217b

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ jobs:
4646
- runs-on: ubuntu-latest
4747
target: aarch64-unknown-linux-musl
4848

49+
- runs-on: macos-latest
50+
target: x86_64-apple-darwin
51+
52+
- runs-on: macos-latest
53+
target: aarch64-apple-darwin
54+
4955
steps:
5056
- uses: actions/checkout@v4
5157

@@ -63,8 +69,8 @@ jobs:
6369
- name: Clean build cache
6470
run: cargo clean
6571

66-
- name: Build (Windows)
67-
if: ${{ matrix.runs-on == 'windows-latest' }}
72+
- name: Build (Windows, macOS)
73+
if: ${{ matrix.runs-on != 'ubuntu-latest' }}
6874
run: cargo build --release --all-features --target=${{ matrix.target }}
6975

7076
- name: Build (Linux, cross compile)
@@ -80,9 +86,9 @@ jobs:
8086
cp target/${{ matrix.target }}/release/csm.exe release/
8187
Compress-Archive -Path release/ -DestinationPath csm-${{ github.ref_name }}-${{ matrix.target }}.zip
8288
83-
- name: Create a tar.gz (linux)
89+
- name: Create a tar.gz (Linux, macOS)
8490
id: create-tar
85-
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
91+
if: ${{ matrix.runs-on != 'windows-latest' }}
8692
run: |
8793
mkdir release
8894
cp LICENSE release/
@@ -108,6 +114,7 @@ jobs:
108114
include:
109115
- runs-on: windows-latest
110116
- runs-on: ubuntu-latest
117+
- runs-on: macos-latest
111118
steps:
112119
- name: Try latest release (linux)
113120
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
@@ -116,6 +123,13 @@ jobs:
116123
tar -xvf csm-*.tar.gz
117124
./release/csm --version
118125
126+
- name: Try latest release (macOS)
127+
if: ${{ matrix.runs-on == 'macos-latest' }}
128+
run: |
129+
wget https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/csm-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
130+
tar -xvf csm-*.tar.gz
131+
./release/csm --version
132+
119133
- name: Try latest release (windows)
120134
if: ${{ matrix.runs-on == 'windows-latest' }}
121135
run: |

0 commit comments

Comments
 (0)