Skip to content

Reverse Publish Demo Workflow Order of Operations #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions .github/workflows/release_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,7 @@ env:
DEMO_KEYSTORE_FILE: /home/runner/demo_keystore.keystore
DEMO_GCP_SERVICE_ACCOUNT_CREDENTIALS_FILE: /home/runner/demo_gcp_service_account_credentials.json
jobs:
bump_demo_app_version_code:
name: Bump Demo App Version
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set github user
uses: ./.github/actions/set_github_user
- name: Update Version
run: |
VERSION_CODE=$(./gradlew -q getDemoAppVersionCode)
UPDATED_VERSION_CODE=$((${VERSION_CODE} + 1))

./gradlew -PdemoAppVersionCodeParam=${UPDATED_VERSION_CODE} setDemoAppVersionCode

git add .
git commit -m "Bump demo app version code to ${UPDATED_VERSION_CODE}"
git push origin HEAD
publish_demo_app:
needs: [ bump_demo_app_version_code ]
name: Publish Demo App
runs-on: ubuntu-latest
steps:
Expand All @@ -48,3 +29,22 @@ jobs:
DEMO_KEYSTORE_PASSWORD: ${{ secrets.DEMO_KEYSTORE_PASSWORD }}
DEMO_KEY_ALIAS: ${{ secrets.DEMO_KEY_ALIAS }}
DEMO_KEY_PASSWORD: ${{ secrets.DEMO_KEY_PASSWORD }}
bump_demo_app_version_code:
needs: [ publish_demo_app ]
name: Bump Demo App Version
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set github user
uses: ./.github/actions/set_github_user
- name: Update Version
run: |
VERSION_CODE=$(./gradlew -q getDemoAppVersionCode)
UPDATED_VERSION_CODE=$((${VERSION_CODE} + 1))

./gradlew -PdemoAppVersionCodeParam=${UPDATED_VERSION_CODE} setDemoAppVersionCode

git add .
git commit -m "Bump demo app version code to ${UPDATED_VERSION_CODE}."
git push origin HEAD