Skip to content

Commit

Permalink
resplit prod and safari build to use different images
Browse files Browse the repository at this point in the history
  • Loading branch information
aristidesstaffieri committed Aug 30, 2023
1 parent 9233949 commit 008495b
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/submitProduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,6 @@ jobs:
client-id: ${{ secrets.EXTENSION_CLIENT_ID }}
client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }}
refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }}
- name: Set up ruby env
uses: ruby/[email protected]
with:
ruby-version: 2.6.10
bundler-cache: true
- name: Bundle extension for Safari
run: bundle exec fastlane build
env:
APPLE_APP_ID: ${{ secrets.ASC_KEY_ID }}
APPL_TEAM_ID: ${{ secrets.APPL_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: ${{ secrets.XCODE_PROJ_PATH }} # TODO: still need the step to use converter
- name: Upload archive to Apple Store
run: bundle exec fastlane upload
- name: Slack Notification
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 #v2.2.0
env:
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/submitSafari.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Production Deployment
on:
workflow_dispatch:
inputs:
version:
description: New Version
default: "1.0.0"
required: true
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@v2
- name: Update package.json version
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1
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@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1
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@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1
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@4ec615c8a75164a61d8fb333ad5e2e86ff038af1 #v1.2
with:
string: ${{ github.event.inputs.version }}
pattern: \-(.*)
replace-with: ""
- name: Update manifest-v2.json version
uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1
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@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1
with:
file: ./extension/public/static/manifest/v3.json
field: version
value: ${{ steps.manifest_version.outputs.replaced }}
- name: Build extension
uses: actions/setup-node@v1
with:
node-version: "16.14"
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"'
- name: Convert extension to Xcode project
run: xcrun safari-web-extension-converter ./extension/build --project-location ./extension/freighter-xcode --macos-only
- name: Set up ruby env
uses: ruby/[email protected]
with:
ruby-version: 2.6.10
bundler-cache: true
- name: Bundle extension for Safari
run: bundle exec fastlane build
env:
APPLE_APP_ID: ${{ secrets.ASC_KEY_ID }}
APPL_TEAM_ID: ${{ secrets.APPL_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: ${{ secrets.XCODE_PROJ_PATH }} # TODO: still need the step to use converter
- name: Upload archive to Apple Store
run: bundle exec fastlane upload

0 comments on commit 008495b

Please sign in to comment.