-
Notifications
You must be signed in to change notification settings - Fork 39
86 lines (71 loc) · 3.01 KB
/
release.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
name: Test macOS Build
on:
push:
branches:
- macos_build_failure_testing
pull_request:
branches:
- macos_build_failure_testing
workflow_dispatch:
jobs:
test-macos-build:
name: Test macOS Dashmate Build
runs-on: macos-14
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ secrets.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Retrieve JS build artifacts
uses: strophy/actions-cache@opendal-update
with:
bucket: multi-runner-cache-x1xibo9c
root: actions-cache
path: build-js-artifacts-${{ github.sha }}.tar
key: build-js-artifacts/${{ github.sha }}
- name: Unpack JS build artifacts archive
run: tar -xf build-js-artifacts-${{ github.sha }}.tar
- name: Install macOS build deps
run: |
brew install llvm coreutils
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
- name: Set up Docker for macOS
uses: docker-practice/actions-setup-docker@master
- name: Install the Apple certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.MACOS_BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.MACOS_P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Setup Node.JS
uses: ./.github/actions/nodejs
- name: Create package
env:
OSX_KEYCHAIN: ${{ runner.temp }}/app-signing.keychain-db
run: "${GITHUB_WORKSPACE}/scripts/pack_dashmate.sh macos"
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dashmate-macos
path: packages/dashmate/dist/**
- name: Notarize MacOS Release Build
run: |
find packages/dashmate/dist/ -name '*.pkg' -exec sh -c 'xcrun notarytool submit "{}" --apple-id "${{ secrets.MACOS_APPLE_ID }}" --team-id "${{ secrets.MACOS_TEAM_ID }}" --password "${{ secrets.MACOS_NOTARIZING_PASSWORD }}" --wait;' \;