-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.42 KB
/
release.yml
File metadata and controls
54 lines (45 loc) · 1.42 KB
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
51
52
53
54
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
name: Build and Release
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: x86_64-apple-darwin, aarch64-apple-darwin
- name: Build for both architectures
run: |
cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
- name: Create Universal Binary
run: |
mkdir -p target/universal/release
lipo -create -output target/universal/release/clamguard \
target/x86_64-apple-darwin/release/clamguard \
target/aarch64-apple-darwin/release/clamguard
- name: Build App Bundle
run: make app TARGET_DIR=target/universal/release
- name: Ad-hoc Sign App
run: |
codesign -s - --force ClamGuard.app/Contents/MacOS/clamguard
- name: Zip App Bundle
run: |
ditto -c -k --sequesterRsrc --keepParent ClamGuard.app ClamGuard.zip
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ClamGuard.zip
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GTOKEN }}