Skip to content

Publish Release

Publish Release #37

Workflow file for this run

#
# Copyright 2022 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: Publish Release
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag (version) to be released (ex: 1.2.3).'
type: string
required: true
create-github-release:
description: 'Create GitHub release using tag. If the provided `tag` does not exist, it will be created.'
type: boolean
required: true
default: true
extension:
type: choice
description: Extension which will be released.
options:
- core
- identity
- lifecycle
- signal
core-dependency:
description: 'The Core dependency version in gradle.properties to be validated (when non-Core extension is selected) (ex: 1.2.3).'
type: string
default: ''
jobs:
publish-core:
if: ${{ github.event.inputs.extension == 'core' }}
permissions:
contents: write
uses: adobe/aepsdk-commons/.github/workflows/[email protected]
with:
tag: ${{ github.event.inputs.tag }}
create-github-release: ${{ github.event.inputs.create-github-release == 'true' }}
release-variant: ${{ github.event.inputs.extension }}
version-validation-name: ${{ github.event.inputs.extension }}
version-validation-paths: code/gradle.properties:properties_multi_module, code/core/src/main/java/com/adobe/marketing/mobile/internal/CoreConstants.kt
secrets: inherit
compute-version-path:
runs-on: ubuntu-24.04
if: ${{ github.event.inputs.extension != 'core' }}
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
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"
publish:
if: ${{ github.event.inputs.extension != 'core' }}
permissions:
contents: write
needs: compute-version-path
uses: adobe/aepsdk-commons/.github/workflows/[email protected]
with:
tag: ${{ github.event.inputs.tag }}
create-github-release: ${{ github.event.inputs.create-github-release == 'true' }}
release-variant: ${{ github.event.inputs.extension }}
version-validation-name: ${{ github.event.inputs.extension }}
version-validation-paths: code/gradle.properties:properties_multi_module, ${{ needs.compute-version-path.outputs.version_path }}
version-validation-dependencies: Core ${{ github.event.inputs.core-dependency }}
secrets: inherit