forked from lapce/lapce
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (71 loc) · 2.56 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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
- rust-arch: aarch64
darwin-arch: x86_64
runs-on: macos-13
- rust-arch: aarch64
darwin-arch: x86_64
runs-on: macos-12
- rust-arch: aarch64
darwin-arch: x86_64
runs-on: macos-11
env:
RELEASE_TAG_NAME: nightly
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
RELEASE_DIR: ./target/${{ matrix.rust-arch }}-apple-darwin/release-lto
CARGO_BUILD_TARGET: ${{ matrix.rust-arch }}-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Update rust
run: rustup update && rustup target add ${{ env.CARGO_BUILD_TARGET }}
- 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
- name: Rename
run: |
cp ${{ env.RELEASE_DIR }}/macos/Lapce.dmg ${{ env.RELEASE_DIR }}/macos/${{ env.DMG_NAME }}
- name: Notarize Release Build
uses: lando/notarize-action@v2
with:
product-path: "${{ env.RELEASE_DIR }}/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: "${{ env.RELEASE_DIR }}/macos/${{ env.DMG_NAME }}"
- uses: actions/upload-artifact@v4
with:
name: lapce-macos-${{ matrix.runs-on }}
path: |
${{ env.RELEASE_DIR }}/macos/${{ env.DMG_NAME }}
retention-days: 7