-
Notifications
You must be signed in to change notification settings - Fork 7
98 lines (97 loc) · 3.6 KB
/
release.yml
File metadata and controls
98 lines (97 loc) · 3.6 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
name: Draft GitHub Release
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
distribute_app:
runs-on: macos-26
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: MacOS version
run: sw_vers
- name: Set up Homebrew
id: set_up_homebrew
uses: Homebrew/actions/setup-homebrew@master
- uses: gsabran/setup-swift@main
with:
swift-version: "6.2"
soft-fail-version-check: true
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "26.0"
- uses: actions/setup-node@v4
with:
node-version-file: "./local-server/.nvmrc"
- name: Enable Corepack
run: corepack enable
- name: Load npm cache
if: ${{ github.run_attempt == 1 }}
uses: actions/cache@v4
with:
path: local-server/node_modules
key: ${{ runner.os }}_npm_modules_${{ hashFiles('local-server/yarn.lock') }}
- name: Install node dependencies
run: cd local-server && yarn install && yarn build && yarn copy-to-app
# See https://github.com/actions/runner-images/issues/10722#issuecomment-2387952421
- uses: extractions/netrc@v1
with:
machine: github.com
username: oauth2
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install release dependencies
run: |
npm install --global create-dmg
npm install --global @bugsnag/cli
brew install sentry-cli
- name: Set macOS SDK root
run: echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
- uses: ruby/setup-ruby@v1
with:
ruby-version: ".ruby-version"
bundler-cache: true
working-directory: app/fastlane
- name: Load SPM packages cache
if: ${{ github.run_attempt == 1 }}
uses: actions/cache@v4
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/Library/org.swift.swiftpm
key: ${{ runner.os }}_spm_packages_${{ hashFiles('app/modules/Package.resolved') }}
restore-keys: |
${{ runner.os }}_spm_packages_
- name: Load release build cache
if: ${{ github.run_attempt == 1 }}
uses: actions/cache@v4
with:
path: app/build/derived_data
key: ${{ runner.os }}_release_build_${{ github.sha }}
restore-keys: |
${{ runner.os }}_release_build_main
${{ runner.os }}_release_build_
- name: Publish release
run: cd app/fastlane && bundle exec fastlane mac distribute_release
env:
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 10
FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN: ${{ secrets.FASTLANE_MACH_REPO_GITHUB_ACCESS_TOKEN }}
MATCH_PASSWORD: ${{ secrets.FASTLANE_MACH_PASSWORD }}
NOTARY_KEY_ID: ${{ secrets.NOTARY_KEY_ID }}
NOTARY_P8: ${{ secrets.NOTARY_P8 }}
NOTARY_ISSUER_ID: ${{ secrets.NOTARY_ISSUER_ID }}
SPARKLE_SECRET_KEY: ${{ secrets.SPARKLE_SECRET_KEY }}
GH_WRITE_TOKEN: ${{ secrets.GH_WRITE_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_RUN_ATTEMPT: ${{ github.run_attempt }}
- name: Upload build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: xcodebuild-logs-distribute
path: app/build/logs/
if-no-files-found: warn