Skip to content

Commit

Permalink
Merge pull request #52 from WalletConnect/fix/release-workflow
Browse files Browse the repository at this point in the history
Fix/release workflow
  • Loading branch information
xxbrendenxx committed Mar 15, 2024
2 parents 0813af9 + 99e0a07 commit 0c54c32
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 84 deletions.
8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCHEME = "Example"
APP_IDENTIFIER = "com.walletconnect.web3modal.sample"
MATCH_IDENTIFIERS = "com.walletconnect.web3modal.sample"
APPLE_ID = "6469691466"
SCHEME="Example"
APP_IDENTIFIER="com.walletconnect.web3modal.sample"
MATCH_IDENTIFIERS="com.walletconnect.web3modal.sample"
APPLE_ID="6469691466"
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ jobs:
${{ runner.os }}-spm-
- name: Release
shell: bash
shell: /bin/zsh -e {0}
env:
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
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 }}
git config --global user.name "radeknovis"
git config --global user.email "[email protected]"
make release TOKEN=$(echo -n $GH_USER:$GH_TOKEN | base64) PROJECT_ID=${{ secrets.PROJECT_ID }}
46 changes: 22 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-core (3.190.1)
aws-partitions (1.887.0)
aws-sdk-core (3.191.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.75.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.142.0)
aws-sdk-core (~> 3, >= 3.189.0)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
Expand Down Expand Up @@ -59,10 +59,10 @@ GEM
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20231109)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.108.0)
excon (0.109.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -94,7 +94,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.217.0)
fastlane (2.219.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -113,6 +113,7 @@ GEM
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
Expand All @@ -121,7 +122,7 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
optparse (>= 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
Expand All @@ -140,38 +141,36 @@ GEM
rchardet (~> 1.8)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.2)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.29.0)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (2.1.0)
faraday (>= 1.0, < 3.a)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.45.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.29.0)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.9.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
Expand All @@ -190,7 +189,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.3.0)
multipart-post (2.4.0)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
Expand All @@ -199,7 +198,7 @@ GEM
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
optparse (0.1.1)
optparse (0.4.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
Expand Down Expand Up @@ -237,9 +236,8 @@ GEM
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.23.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand Down
22 changes: 16 additions & 6 deletions Sample/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 16;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = W5R8AG9K22;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -377,6 +380,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.walletconnect.web3modal.sample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROJECT_ID = "$(PROJECT_ID)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.walletconnect.web3modal.sample";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
Expand All @@ -393,12 +398,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 12;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 16;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "\"Example/Preview Content\"";
DEVELOPMENT_TEAM = W5R8AG9K22;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -424,6 +432,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.walletconnect.web3modal.sample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROJECT_ID = "$(PROJECT_ID)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.walletconnect.web3modal.sample";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/WalletConnect/WalletConnectSwiftV2",
"state" : {
"revision" : "addf9a3688ef5e5d9d148ecbb30ca0fd3132b908",
"version" : "1.9.8"
"revision" : "f2db5e796976e6294b40da01c443f39a16b4732a",
"version" : "1.12.0"
}
}
],
Expand Down
86 changes: 40 additions & 46 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,44 @@ 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


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: true,
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,
)
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
32 changes: 32 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

## iOS

### ios release_testflight

```sh
[bundle exec] fastlane ios release_testflight
```



----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

0 comments on commit 0c54c32

Please sign in to comment.