-
Notifications
You must be signed in to change notification settings - Fork 71
50 lines (46 loc) · 1.58 KB
/
release-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build MacOS Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
save-always: true
- name: Rustup
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- name: Build x86_64
run: cargo build --target=x86_64-apple-darwin -F ${{ vars.CARGO_FEATURES }} --release
- name: Build aarch64
run: cargo build --target=aarch64-apple-darwin -F ${{ vars.CARGO_FEATURES }} --release
- name: Lipo
run: mkdir -p target/release ; lipo -create -output target/release/loungy target/x86_64-apple-darwin/release/loungy target/aarch64-apple-darwin/release/loungy
- name: Install Packer
run: cargo install cargo-packager --locked
- name: Package
run: cargo packager --release
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
target/release/*.dmg