Skip to content

Update Versions

Update Versions #24

#
# Copyright 2023 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
name: Update Versions
on:
workflow_dispatch:
inputs:
extension:
type: choice
description: Select the extension for which the version should be updated.
options:
- core
- identity
- lifecycle
- signal
version:
description: 'New version to use for the extension (ex: 1.2.3).'
type: string
required: true
branch:
description: 'The target branch where the version update will be applied and the pull request will be merged into.'
type: string
required: true
jobs:
compute-version-path:
runs-on: ubuntu-24.04
outputs:
version_path: ${{ steps.set-path.outputs.version_path }}
steps:
- name: Compute version file paths
id: set-path
run: |
case "${{ github.event.inputs.extension }}" in
core)
PATH_RESULT="code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt"
;;
lifecycle)
PATH_RESULT="code/lifecycle/src/phone/java/com/adobe/marketing/mobile/Lifecycle.java"
;;
identity)
PATH_RESULT="code/identity/src/phone/java/com/adobe/marketing/mobile/Identity.java"
;;
signal)
PATH_RESULT="code/signal/src/phone/java/com/adobe/marketing/mobile/Signal.java"
;;
*)
echo "::error ::Invalid extension selected."
exit 1
;;
esac
echo "version_path=$PATH_RESULT" >> "$GITHUB_ENV"
echo "version_path=$PATH_RESULT" >> "$GITHUB_OUTPUT"
update-versions:
permissions:
contents: write
pull-requests: write
needs: compute-version-path
uses: adobe/aepsdk-commons/.github/workflows/[email protected]
with:
name: ${{ github.event.inputs.extension }}
version: ${{ github.event.inputs.version }}
branch: ${{ github.event.inputs.branch }}
paths: code/gradle.properties:properties_multi_module, ${{ needs.compute-version-path.outputs.version_path }}
update: true