Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing workflow filter #1605

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/scripts/archive-safari-app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -eo pipefail

# convert extension for apple platforms
xcrun safari-web-extension-converter ./build --project-location ./apple-build

xcodebuild -project ./apple-build/Freighter/Freighter.xcodeproj -scheme Freighter -archivePath /tmp/build-archive.xcarchive archive

xcodebuild -archivePath /tmp/build-archive.xcarchive \
-exportOptionsPlist /tmp/build-archive.xcarchive/Info.plist \
-exportPath ./final \
-allowProvisioningUpdates \
-exportArchive

xcrun altool --upload-package --apple-id $APPLE_ID -t ios -t macos -f final/Freighter.ipa --apiKey $API_KEY --apiIssuer $API_ISSUER --verbose
2 changes: 1 addition & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16.14.0
- run: yarn install
- run: yarn setup
- run: yarn build:freighter-api
- run: yarn test:ci
2 changes: 1 addition & 1 deletion .github/workflows/submitBeta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: "16.14"
- run: yarn install && yarn build:freighter-api && yarn build:extension:production
- run: yarn setup && yarn build:freighter-api && yarn build:extension:production
- name: Use BETA icons
run: |
rm -rf ./extension/build/images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/submitProduction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: "16.14"
- run: yarn install && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"'
- 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: Install zip
uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1
- name: Zip extension build
Expand Down
102 changes: 102 additions & 0 deletions .github/workflows/submitSafari.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Safari Deployment
on:
push:
inputs:
version:
description: New Version
default: "1.0.0"
required: true
jobs:
bump-version-safari:
name: Bump Package Version and Submit Extension to Safari
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- 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: Install zip
uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1
- name: Zip extension build
run: zip -qq -r ./build.zip *
working-directory: ./extension/build
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "docs(): bumping release to ${{ github.event.inputs.version }}"
git tag ${{ github.event.inputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad #v3.10.1
with:
title: Bump versions to ${{ github.event.inputs.version }}
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: ${{ github.event.inputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./extension/build/build.zip
asset_name: build-${{ github.event.inputs.version }}.zip
asset_content_type: application/zip
- name: Submit extension to Apple
run: ./.github/scripts/archive-safari-app.sh
env:
apiKey: ${{ secrets.APPLE_API_KEY }}
apiIssuerId: ${{ secrets.APPLE_ISSUER_ID }}
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-scripts true
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enableScripts: false
9 changes: 8 additions & 1 deletion @shared/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@
"@stellar/wallet-sdk": "^0.8.0",
"bignumber.js": "^9.1.1",
"prettier": "^2.0.5",
"stellar-sdk": "^10.4.1",
"soroban-client": "^0.9.1",
"stellar-sdk": "^10.4.1",
"typescript": "~3.7.2",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1",
"@stellar/prettier-config": "^1.0.1"
},
"lavamoat": {
"allowScripts": {
"soroban-client>stellar-base>sodium-native": false,
"stellar-sdk>stellar-base>sodium-native": false
}
}
}
10 changes: 8 additions & 2 deletions @shared/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
"prettier": "@stellar/prettier-config",
"version": "1.0.0",
"dependencies": {
"typescript": "~3.7.2",
"stellar-sdk": "^10.4.1"
"stellar-sdk": "^10.4.1",
"typescript": "~3.7.2"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1",
"@stellar/prettier-config": "^1.0.1"
},
"lavamoat": {
"allowScripts": {
"stellar-sdk>stellar-base>sodium-native": false
}
}
}
5 changes: 4 additions & 1 deletion @stellar/freighter-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
"start": "webpack --config webpack.dev.js --watch --mode development"
},
"types": "build/@stellar/freighter-api/src/index.d.ts",
"dependencies": {}
"dependencies": {},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.3.1"
}
}
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "fastlane"
Loading
Loading