-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions workflow [SDK-4433] (#307)
Co-authored-by: Poovamraj T T <[email protected]>
- Loading branch information
Showing
20 changed files
with
1,784 additions
and
2,789 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,60 @@ | ||
name: Set up Android environment | ||
description: Set up the environment for building and testing the library on Android | ||
|
||
inputs: | ||
flutter: | ||
description: The version of Flutter to use | ||
required: true | ||
|
||
java: | ||
description: The version of Java to use | ||
required: true | ||
|
||
auth0-domain: | ||
description: The Auth0 domain | ||
required: true | ||
|
||
auth0-client-id: | ||
description: The Auth0 client ID | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Install Flutter | ||
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
flutter-version: ${{ inputs.flutter }} | ||
channel: stable | ||
cache: true | ||
|
||
- name: Install Flutter dependencies | ||
working-directory: auth0_flutter/example | ||
run: flutter pub get | ||
shell: bash | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: ${{ inputs.java }} | ||
cache: 'gradle' | ||
|
||
- name: Set .env | ||
working-directory: auth0_flutter/example | ||
run: printf '%s\n%s\n%s' 'AUTH0_DOMAIN=${{ inputs.auth0-domain }}' 'AUTH0_CLIENT_ID=${{ inputs.auth0-client-id }}' 'AUTH0_CUSTOM_SCHEME=demo' >> .env | ||
shell: bash | ||
|
||
- name: Set strings.xml | ||
working-directory: auth0_flutter/example/android/app/src/main/res/values | ||
run: | | ||
mv strings.xml.example strings.xml | ||
sed -r -i.bak 's/YOUR_AUTH0_DOMAIN/${{ inputs.auth0-domain }}/' strings.xml | ||
rm strings.xml.bak | ||
shell: bash | ||
|
||
- name: Set Gradle wrapper | ||
working-directory: auth0_flutter/example/android | ||
run: gradle wrapper | ||
shell: bash |
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,72 @@ | ||
name: Set up iOS environment | ||
description: Set up the environment for building and testing the library on iOS | ||
|
||
inputs: | ||
flutter: | ||
description: The version of Flutter to use | ||
required: true | ||
|
||
xcode: | ||
description: The version of Xcode to use | ||
required: true | ||
|
||
auth0-domain: | ||
description: The Auth0 domain | ||
required: true | ||
|
||
auth0-client-id: | ||
description: The Auth0 client ID | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Install Flutter | ||
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | ||
with: | ||
flutter-version: ${{ inputs.flutter }} | ||
channel: stable | ||
cache: true | ||
|
||
- name: Install Flutter dependencies | ||
working-directory: auth0_flutter/example | ||
run: flutter pub get | ||
shell: bash | ||
|
||
- name: Set Ruby version | ||
working-directory: auth0_flutter/example/ios | ||
run: ruby -e 'puts RUBY_VERSION' | tee .ruby-version | ||
shell: bash | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 | ||
with: | ||
bundler-cache: true | ||
cache-version: 1 | ||
working-directory: auth0_flutter/example/ios | ||
|
||
- name: Setup Xcode | ||
run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode }}.app/Contents/Developer | ||
shell: bash | ||
|
||
- name: Save Xcode version | ||
run: xcodebuild -version | tee .xcode-version | ||
shell: bash | ||
|
||
- id: restore-pods-cache | ||
name: Restore Pods cache | ||
uses: actions/cache@f5ce41475b483ad7581884324a6eca9f48f8dcc7 | ||
with: | ||
path: auth0_flutter/example/ios/Pods | ||
key: pods-${{ hashFiles('Podfile.lock') }}-${{ hashFiles('.xcode-version') }}-v1 | ||
|
||
- name: Install pods | ||
working-directory: auth0_flutter/example/ios | ||
run: pod install | ||
shell: bash | ||
|
||
- name: Set .env | ||
working-directory: auth0_flutter/example | ||
run: printf '%s\n%s\n%s' 'AUTH0_DOMAIN=${{ inputs.auth0-domain }}' 'AUTH0_CLIENT_ID=${{ inputs.auth0-client-id }}' 'AUTH0_CUSTOM_SCHEME=demo' >> .env | ||
shell: bash |
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,7 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
Oops, something went wrong.