-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from WalletConnect/feat/automate-release
- Loading branch information
Showing
12 changed files
with
128 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SCHEME = "Example" | ||
APP_IDENTIFIER = "com.walletconnect.web3modal.sample" | ||
MATCH_IDENTIFIERS = "com.walletconnect.web3modal.sample" | ||
APPLE_ID = "6469691466" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: | ||
group: apple-silicon | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.build | ||
SourcePackagesCache | ||
DerivedDataCache | ||
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | ||
restore-keys: | | ||
${{ runner.os }}-spm- | ||
- name: Release | ||
shell: bash | ||
env: | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GH_USER: ${{ secrets.GH_USER }} | ||
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} | ||
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }} | ||
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }} | ||
run: | | ||
make release TOKEN=$(echo -n $GH_USER:$GH_TOKEN | base64) PROJECT_ID=${{ secrets.RELEASE_PROJECT_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
unit_tests: | ||
./run_tests.sh --scheme swift-web3modal-Package | ||
|
||
release: | ||
fastlane release_testflight token:$(TOKEN) project_id:$(PROJECT_ID) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Uncomment next line and paste your project id. Get this on: https://cloud.walletconnect.com/sign-in | ||
PROJECT_ID = 9bfe94c9cbf74aaa0597094ef561f703 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Foundation | ||
|
||
struct InputConfig { | ||
|
||
static var projectId: String { | ||
guard let projectId = config(for: "PROJECT_ID"), !projectId.isEmpty else { | ||
fatalError("PROJECT_ID is either not defined or empty in Configuration.xcconfig") | ||
} | ||
|
||
return projectId | ||
} | ||
|
||
private static func config(for key: String) -> String? { | ||
return Bundle.main.object(forInfoDictionaryKey: key) as? String | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
itc_team_id("123564616") | ||
team_id("W5R8AG9K22") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" | ||
|
||
default_platform(:ios) | ||
|
||
platform :ios do | ||
lane :release_testflight do |options| | ||
setup_ci | ||
api_key = app_store_connect_api_key( | ||
key_id: ENV["APPLE_KEY_ID"], | ||
issuer_id: ENV["APPLE_ISSUER_ID"], | ||
key_content: ENV["APPLE_KEY_CONTENT"], | ||
duration: 1200, | ||
in_house: false, | ||
) | ||
match( | ||
readonly: false, | ||
type: "appstore", | ||
app_identifier: ENV["MATCH_IDENTIFIERS"], | ||
git_url: "https://github.com/WalletConnect/match-swift.git", | ||
git_basic_authorization: options[:token], | ||
api_key: api_key, | ||
include_all_certificates: true, | ||
force_for_new_devices: true, | ||
force_for_new_certificates: true | ||
) | ||
number = latest_testflight_build_number( | ||
app_identifier: ENV["APP_IDENTIFIER"], | ||
api_key: api_key | ||
) | ||
increment_build_number( | ||
build_number: number + 1, | ||
xcodeproj: "Sample/Example.xcodeproj" | ||
) | ||
gym( | ||
configuration: "Release", | ||
project: "Sample/Example.xcodeproj", | ||
scheme: ENV["SCHEME"], | ||
export_method: "app-store", | ||
xcargs: "PROJECT_ID='#{options[:project_id]}" | ||
) | ||
upload_to_testflight( | ||
apple_id: ENV["APPLE_ID"], | ||
app_identifier: ENV["APP_IDENTIFIER"], | ||
changelog: "Web3Modal sample app weekly build 🚀", | ||
skip_waiting_for_build_processing: true | ||
) | ||
clean_build_artifacts() | ||
end | ||
|
||
|
||
end | ||
|