forked from lapce/lapce
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (61 loc) · 2.19 KB
/
release-test-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release Test
on:
pull_request:
paths:
- .github/workflows/release-test-macos.yml
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
macos:
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- rust-arch: aarch64
darwin-arch: arm64
runs-on: macos-14
env:
RELEASE_TAG_NAME: ${{ needs.tagname.outputs.tag_name }}
NOTARIZE_USERNAME: ${{ secrets.NOTARIZE_USERNAME }}
NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }}
APP_NAME: Lapce-macos-${{ matrix.rust-arch }}.app
DMG_NAME: lapce-macos-${{ matrix.rust-arch }}.dmg
# CARGO_BUILD_TARGET: ${{ matrix.rust-arch }}-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Update rust
run: rustup update
- name: Import Certificate
uses: Apple-Actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: Fetch dependencies
run: cargo fetch --locked
- name: Make DMG
run: make dmg-universal
- name: Rename
run: |
cp ./target/release-lto/macos/Lapce.dmg ./target/release-lto/macos/${{ env.DMG_NAME }}
- name: Notarize Release Build
uses: lando/notarize-action@v2
with:
product-path: "./target/release-lto/macos/${{ env.DMG_NAME }}"
appstore-connect-username: ${{ secrets.NOTARIZE_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZE_PASSWORD }}
appstore-connect-team-id: CYSGAZFR8D
primary-bundle-id: "io.lapce"
- name: "Staple Release Build"
uses: lapce/xcode-staple@062485d6eeafe841c18a412f012e80f49e23c517
with:
product-path: "./target/release-lto/macos/${{ env.DMG_NAME }}"
- uses: actions/upload-artifact@v4
with:
name: lapce-macos-${{ matrix.rust-arch }}
path: |
./target/release-lto/macos/${{ env.DMG_NAME }}
retention-days: 1