Add DeployGateSdkConfiguration class and DeployGate#install to sdkMock #119
Workflow file for this 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
name: Build the sample project and upload artifacts if possible | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
# Run this job when new version has been released and available. | |
workflow_dispatch: | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name != 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17.x' | |
java-package: jdk | |
distribution: 'temurin' | |
cache: 'gradle' | |
- run: ./gradlew sample:bundleDevrealDebug sample:bundleDevrealRelease sample:bundleDevmockDebug sample:bundleDevmockRelease | |
- name: upload aab files | |
run: | | |
if [[ -z '${{ secrets.SHARED_DEPLOYGATE_APP_OWNER_NAME_FOR_PUBLIC_REPO }}' ]]; then | |
echo '::notice::contributors cannot upload files to deploygate' | |
exit 0 | |
fi | |
if [[ -z '${{ github.event.pull_request.number }}' ]]; then | |
distribution_name="canary" | |
else | |
distribution_name="sdk/pulls/${{ github.event.pull_request.number }}" | |
fi | |
while read -r aab_path; do | |
curl \ | |
-F file=@$aab_path \ | |
-F distribution_name="$distribution_name" \ | |
-H 'Authorization: token ${{ secrets.SHARED_DEPLOYGATE_API_TOKEN_FOR_PUBLIC_REPO }}' \ | |
--url 'https://deploygate.com/api/users/${{ secrets.SHARED_DEPLOYGATE_APP_OWNER_NAME_FOR_PUBLIC_REPO }}/apps' | \ | |
jq -r '"\(.results.package_name) \(.results.distribution.url)"' | |
done < <(find ./sample/build/outputs/bundle -name "*.aab") | |
- name: Check javadocs | |
run: ./gradlew sdk:generateJavadocForReleasePublication sdkMock:generateJavadocForReleasePublication | |
distribute-stable: | |
runs-on: ubuntu-latest | |
if: > | |
github.event_name == 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17.x' | |
java-package: jdk | |
distribution: 'temurin' | |
cache: 'gradle' | |
- run: ./gradlew sample:bundleStablerealDistribute sample:bundleStablemockDistribute | |
- name: upload aab files | |
run: | | |
distribution_name="deploygate-sdk-sample" | |
while read -r aab_path; do | |
curl \ | |
-F file=@$aab_path \ | |
-F distribution_name="$distribution_name" \ | |
-H 'Authorization: token ${{ secrets.SHARED_DEPLOYGATE_API_TOKEN_FOR_PUBLIC_REPO }}' \ | |
--url 'https://deploygate.com/api/users/${{ secrets.SHARED_DEPLOYGATE_APP_OWNER_NAME_FOR_PUBLIC_REPO }}/apps' | \ | |
jq -r '"\(.results.package_name) \(.results.distribution.url)"' | |
done < <(find ./sample/build/outputs/bundle -name "*.aab") |