-
Notifications
You must be signed in to change notification settings - Fork 151
120 lines (107 loc) · 3.34 KB
/
Copy pathbuild-desktop.yml
File metadata and controls
120 lines (107 loc) · 3.34 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Desktop Build
on:
release:
types:
- published
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '21'
- name: Get Latest Release
id: release
uses: pozetroninc/github-action-get-latest-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
- name: Retrieve macOS Certificate
env:
CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE_CONVEYOR }}
run: |
echo $CERTIFICATE_BASE64 | base64 --decode > macos.cer
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# - name: Cache Gradle and Build
# uses: actions/cache@v4
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# ${{ github.workspace }}/common/build
# ${{ github.workspace }}/desktop/build
# ~/Library/Caches/Hydraulic/Conveyor
# key: ${{ runner.os }}-gradle-desktop
# restore-keys: |
# ${{ runner.os }}-gradle-desktop
- name: Build with Gradle
id: gradle-build
run: |
./gradlew :desktop:build
./gradlew --stop
- name: Download Conveyor
shell: bash
run: |
wget https://downloads.hydraulic.dev/conveyor/conveyor-21.1-mac-aarch64.zip
unzip conveyor-21.1-mac-aarch64.zip
- name: Run Conveyor
shell: bash
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
CONVEYOR_AGREE_TO_LICENSE: 1
run: |
PATH="$PATH:./Conveyor.app/Contents/MacOS"
conveyor \
"-Kapp.signing-key=${{ secrets.SIGNING_KEY }}" \
"-Kapp.mac.certificate=macos.cer" \
"-Kapp.mac.notarization.team-id=${{ secrets.MACOS_TEAM_ID }}" \
"-Kapp.mac.notarization.app-specific-password=${{ secrets.MACOS_NOTARIZATION_PASSWORD }}" \
"-Kapp.mac.notarization.apple-id=${{ secrets.MACOS_NOTARIZATION_ID }}" \
make site
- name: Upload Release Files
uses: ncipollo/release-action@v1
with:
artifacts: 'output/*'
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
replacesArtifacts: false
omitBodyDuringUpdate: true
tag: ${{ steps.release.outputs.release }}
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download release
uses: robinraju/release-downloader@v1
with:
latest: true
out-file-path: '.'
fileName: '*'
- name: Shortcut HTML file
run: ln -s download.html index.html
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4