Update Versions #17
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
# This is a basic workflow that is manually triggered | |
# IMPORTANT! | |
# For this repo which contains AEPCore, AEPIdentity, AEPLifecycle, AEPServices, and AEPSignal, it is assumed | |
# that when the version is updated for AEPCore, all other extensions (excluding AEPServices) will also | |
# have their minimum dependencies updated to the same new version. | |
name: Update Versions | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
inputs: | |
core-version: | |
description: 'New version to use for Core. Example: 3.0.2' | |
required: false | |
identity-version: | |
description: 'New version to use for Identity. Example: 3.0.2' | |
required: false | |
lifecycle-version: | |
description: 'New version to use for Lifecycle. Example: 3.0.2' | |
required: false | |
signal-version: | |
description: 'New version to use for Signal. Example: 3.0.2' | |
required: false | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
update-versions: | |
runs-on: macos-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- if: ${{ github.event.inputs.core-version != '' }} | |
name: Update Core Version | |
run: (sh ./scripts/version.sh -u -n Core -v ${{ github.event.inputs.core-version }}) | |
- if: ${{ github.event.inputs.identity-version != '' }} | |
name: Update Identity Version | |
run: (sh ./scripts/version.sh -u -n Identity -v ${{ github.event.inputs.identity-version }}) | |
- if: ${{ github.event.inputs.lifecycle-version != '' }} | |
name: Update Lifecycle Version | |
run: (sh ./scripts/version.sh -u -n Lifecycle -v ${{ github.event.inputs.lifecycle-version }}) | |
- if: ${{ github.event.inputs.signal-version != '' }} | |
name: Update Signal Version | |
run: (sh ./scripts/version.sh -u -n Signal -v ${{ github.event.inputs.signal-version }}) | |
- name: Generate Commit Message | |
shell: bash | |
run: | | |
COMMIT_MSG="" | |
if [ "${{ github.event.inputs.core-version }}" ]; then | |
COMMIT_MSG="[Core-${{ github.event.inputs.core-version }}]" | |
fi | |
if [ "${{ github.event.inputs.identity-version }}" ]; then | |
COMMIT_MSG="$COMMIT_MSG [Identity-${{ github.event.inputs.identity-version }}]" | |
fi | |
if [ "${{ github.event.inputs.lifecycle-version }}" ]; then | |
COMMIT_MSG="$COMMIT_MSG [Lifecycle-${{ github.event.inputs.lifecycle-version }}]" | |
fi | |
if [ "${{ github.event.inputs.signal-version }}" ]; then | |
COMMIT_MSG="$COMMIT_MSG [Signal-${{ github.event.inputs.signal-version }}]" | |
fi | |
echo $COMMIT_MSG | |
echo COMMIT_MSG=$COMMIT_MSG >> $GITHUB_ENV | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
delete-branch: true | |
commit-message: Update versions ${{ env.COMMIT_MSG }} | |
title: Update versions ${{ env.COMMIT_MSG }} | |
body: Update versions ${{ env.COMMIT_MSG }} |