-
Notifications
You must be signed in to change notification settings - Fork 61
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 #299 from WalletConnect/feature/project_automation
Automation
- Loading branch information
Showing
31 changed files
with
1,798 additions
and
24 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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: ci | ||
description: Executes Dart specific CI steps. | ||
|
||
inputs: | ||
type: | ||
description: The type of CI to run. | ||
|
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 |
---|---|---|
|
@@ -14,26 +14,22 @@ jobs: | |
steps: | ||
# Checkout the repo | ||
- uses: actions/checkout@v3 | ||
|
||
# Install Flutter | ||
- name: Install and set Flutter version | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.19.5' | ||
|
||
# Install Flutter and Dependencies | ||
- uses: ./.github/actions/dependencies | ||
|
||
# Setup Dart SDK | ||
- uses: dart-lang/setup-dart@v1 | ||
|
||
# Setup Dependencies | ||
- uses: ./.github/actions/dependencies | ||
|
||
# Publish | ||
- name: Check Publish Warnings | ||
shell: bash | ||
run: flutter pub publish --dry-run | ||
|
||
- name: Publish Package | ||
shell: bash | ||
run: flutter pub publish -f | ||
|
||
# Notify | ||
- name: Notify Channel | ||
uses: slackapi/[email protected] | ||
|
@@ -44,4 +40,7 @@ jobs: | |
payload: |- | ||
{ | ||
"text":"🚀 WalletConnectFlutterV2 *${{ github.ref_name }}* was just published at https://pub.dev/packages/walletconnect_flutter_v2" | ||
} | ||
} | ||
# Launch locally | ||
# act -j publish --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/publish.yml |
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,76 @@ | ||
name: Android Web3Dapp deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
runs-on: macos-latest-xlarge | ||
|
||
steps: | ||
# Checkout the repo | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Create temp firebase key | ||
# - name: Create temp firebase key | ||
# env: | ||
# FIREBASE_KEY_BASE64: ${{ secrets.FIREBASE_KEY_BASE64 }} | ||
# run: | | ||
# # create variables | ||
# FIREBASE_KEY_PATH=$RUNNER_TEMP/flutter-c7c2c-6df892fe6ddb.json | ||
|
||
# # import certificate and provisioning profile from secrets | ||
# echo -n "$FIREBASE_KEY_BASE64" | base64 --decode -o $FIREBASE_KEY_PATH | ||
|
||
# Install Java 17 | ||
- name: Install Java 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
architecture: x86_64 | ||
cache: 'gradle' | ||
|
||
# Cache Gradle | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
# # Install Fastlane | ||
# - name: Install Fastlane | ||
# run: gem install fastlane | ||
|
||
# Install Flutter and Dependencies | ||
- uses: ./.github/actions/dependencies | ||
|
||
# Fastlane | ||
- name: Fastlane | ||
working-directory: example/dapp/android | ||
env: | ||
PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} | ||
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | ||
FIREBASE_DAPP_ID: ${{ secrets.FIREBASE_DAPP_ID }} | ||
run: | | ||
PUBSPEC_FILE=../../../pubspec.yaml | ||
FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) | ||
PARTS=(${FILE_VALUE//:/ }) | ||
FULL_VERSION=${PARTS[1]} | ||
VERSION_NUMBER=(${FULL_VERSION//-/ }) | ||
fastlane add_plugin firebase_app_distribution | ||
fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER | ||
# Launch locally | ||
# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_android.yml |
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,87 @@ | ||
name: iOS Web3Dapp deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
runs-on: macos-latest-xlarge | ||
|
||
steps: | ||
# Checkout the repo | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
# - uses: actions/checkout@v3 | ||
# - uses: ruby/setup-ruby@v1 | ||
# with: | ||
# bundler-cache: true | ||
|
||
# Cache | ||
- name: Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.build | ||
SourcePackagesCache | ||
DerivedDataCache | ||
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | ||
restore-keys: | | ||
${{ runner.os }}-spm- | ||
# # Install Ruby | ||
# - name: Install Ruby | ||
# uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: 3.0.2 | ||
# bundler-cache: true | ||
|
||
# # Install Fastlane | ||
# - name: Install Fastlane | ||
# run: gem install fastlane | ||
|
||
# Install Flutter and Dependencies | ||
- uses: ./.github/actions/dependencies | ||
|
||
# Build App | ||
- name: Build App | ||
working-directory: example/dapp | ||
env: | ||
PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} | ||
run: | | ||
PUBSPEC_FILE=../../pubspec.yaml | ||
FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) | ||
PARTS=(${FILE_VALUE//:/ }) | ||
FULL_VERSION=${PARTS[1]} | ||
VERSION_NUMBER=(${FULL_VERSION//-/ }) | ||
flutter build ipa --build-name $VERSION_NUMBER --dart-define="PROJECT_ID=$PROJECT_ID" --release | ||
# Fastlane | ||
- name: Fastlane | ||
working-directory: example/dapp/ios | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_DAPP_ID: ${{ secrets.APPLE_DAPP_ID }} | ||
PROJECT_ID: ${{ secrets.DAPP_PROJECT_ID }} | ||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | ||
APP_STORE_KEY_ID: ${{ secrets.APP_STORE_KEY_ID }} | ||
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }} | ||
GH_BASIC_AUTH: ${{ secrets.GH_BASIC_AUTH }} | ||
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | ||
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} | ||
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
run: | | ||
PUBSPEC_FILE=../../../pubspec.yaml | ||
FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) | ||
PARTS=(${FILE_VALUE//:/ }) | ||
FULL_VERSION=${PARTS[1]} | ||
VERSION_NUMBER=(${FULL_VERSION//-/ }) | ||
fastlane release_testflight username:$APPLE_ID token:$GH_BASIC_AUTH project_id:$PROJECT_ID app_id:$APPLE_DAPP_ID app_store_key_id:$APP_STORE_KEY_ID apple_issuer_id:$APPLE_ISSUER_ID app_store_connect_key:"$APP_STORE_CONNECT_KEY" match_git_url:$MATCH_GIT_URL app_version:$VERSION_NUMBER | ||
# Launch locally | ||
# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_dapp_ios.yml |
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,76 @@ | ||
name: Android Web3Wallet deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
runs-on: macos-latest-xlarge | ||
|
||
steps: | ||
# Checkout the repo | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Create temp firebase key | ||
# - name: Create temp firebase key | ||
# env: | ||
# FIREBASE_KEY_BASE64: ${{ secrets.FIREBASE_KEY_BASE64 }} | ||
# run: | | ||
# # create variables | ||
# FIREBASE_KEY_PATH=$RUNNER_TEMP/flutter-c7c2c-6df892fe6ddb.json | ||
|
||
# # import certificate and provisioning profile from secrets | ||
# echo -n "$FIREBASE_KEY_BASE64" | base64 --decode -o $FIREBASE_KEY_PATH | ||
|
||
# Install Java 17 | ||
- name: Install Java 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
architecture: x86_64 | ||
cache: 'gradle' | ||
|
||
# Cache Gradle | ||
- name: Cache Gradle | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
# # Install Fastlane | ||
# - name: Install Fastlane | ||
# run: gem install fastlane | ||
|
||
# Install Flutter and Dependencies | ||
- uses: ./.github/actions/dependencies | ||
|
||
# Fastlane | ||
- name: Fastlane | ||
working-directory: example/wallet/android | ||
env: | ||
PROJECT_ID: ${{ secrets.WALLET_PROJECT_ID }} | ||
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | ||
FIREBASE_WALLET_ID: ${{ secrets.FIREBASE_WALLET_ID }} | ||
run: | | ||
PUBSPEC_FILE=../../../pubspec.yaml | ||
FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) | ||
PARTS=(${FILE_VALUE//:/ }) | ||
FULL_VERSION=${PARTS[1]} | ||
VERSION_NUMBER=(${FULL_VERSION//-/ }) | ||
fastlane add_plugin firebase_app_distribution | ||
fastlane release_firebase project_id:$PROJECT_ID app_version:$VERSION_NUMBER | ||
# Launch locally | ||
# act -j build --container-architecture linux/amd64 -P macos-latest-xlarge=-self-hosted --secret-file .github/workflows/.env.secret -W .github/workflows/release_wallet_android.yml |
Oops, something went wrong.