-
Notifications
You must be signed in to change notification settings - Fork 57
90 lines (90 loc) · 3.5 KB
/
Copy pathsubmitSafari.yml
File metadata and controls
90 lines (90 loc) · 3.5 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
name: Safari Deployment
on:
workflow_dispatch:
inputs:
version:
description: New Version
default: "1.0.0"
required: true
env:
GYM_PROJECT: "./extension/freighter-xcode"
jobs:
bump-version:
name: Bump Package Version and Submit Extension
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
- name: Checkout code
uses: actions/checkout@v6
- name: Update package.json version
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 #v2
with:
file: ./extension/package.json
field: version
value: ${{ github.event.inputs.version }}
- name: Update manifest-v2.json version_name
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 #v2
with:
file: ./extension/public/static/manifest/v2.json
field: version_name
value: ${{ github.event.inputs.version }}
- name: Update manifest-v3.json version_name
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 #v2
with:
file: ./extension/public/static/manifest/v3.json
field: version_name
value: ${{ github.event.inputs.version }}
- name: Get manifest.json version
id: manifest_version
uses: frabert/replace-string-action@b6828c5a4cb6371753ff873b0d1c4c4fbd9a63cb #v2.5
with:
string: ${{ github.event.inputs.version }}
pattern: \-(.*)
replace-with: ""
- name: Update manifest-v2.json version
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 #v2
with:
file: ./extension/public/static/manifest/v2.json
field: version
value: ${{ steps.manifest_version.outputs.replaced }}
- name: Update manifest-v3.json version
uses: jossef/action-set-json-field@2a0f7d953b580b828717daf4de7fafc7e4135e97 #v2
with:
file: ./extension/public/static/manifest/v3.json
field: version
value: ${{ steps.manifest_version.outputs.replaced }}
- name: Enable Corepack
run: corepack enable
- name: Build extension
uses: actions/setup-node@v6
with:
node-version: 22
- run:
yarn setup && yarn build:freighter-api && yarn
build:extension:production --env AMPLITUDE_KEY="${{
secrets.AMPLITUDE_KEY }}" AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY="${{
secrets.AMPLITUDE_EXPERIMENT_DEPLOYMENT_KEY }}" SENTRY_KEY="${{
secrets.SENTRY_KEY }}"
- name: Convert extension to Xcode project
run:
xcrun safari-web-extension-converter ./extension/build
--project-location $GYM_PROJECT --macos-only
- name: Set up ruby env
uses: ruby/setup-ruby@v1.310.0
with:
ruby-version: 2.6.10
bundler-cache: true
- name: Bundle extension for Safari
run: bundle exec fastlane build
env:
GYM_PROJECT: $GYM_PROJECT
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPLE_APP_ID: ${{ secrets.APPLE_APP_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_USER_ID: ${{ secrets.APPLE_USER_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_B64_KEY: ${{ secrets.APPLE_B64_KEY }}
XCODE_PROJ_PATH: $GYM_PROJECT
- name: Upload archive to Apple Store
run: bundle exec fastlane upload