-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (54 loc) · 2.18 KB
/
build.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
name: Build and Release
on:
push:
workflow_dispatch:
pull_request:
jobs:
build:
name: Build macOS App
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
- name: Install the Apple certificate
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/applecert.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
- name: Determine tag name
id: tagname
run: echo "name=$(node -e "console.log(require('./package.json').version)")" >> $GITHUB_OUTPUT
- name: Create a draft release
if: github.event_name == 'workflow_dispatch'
uses: softprops/action-gh-release@v1
with:
body: "Changes(변경 사항)\n\n1. \n\n**Before installing, please read [this](https://github.com/mswgen/oc-updater/blob/v1/README.md#installation) carefully!**\n\n**설치하기 전 [여기](https://github.com/mswgen/oc-updater/blob/v1/README-ko.md#installation)를 읽어주세요!**"
draft: true
tag_name: ${{ steps.tagname.outputs.name }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Install Dependencies
run: yarn
- name: Build
run: yarn build
env:
GH_TOKEN: ${{ github.token }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: mac
path: |
out/OpenCore Updater-*.*.*-universal.dmg
out/latest-mac.yml