Maurizio Cacace 680319596a
ACS-4814 - Use PR id for library publishing (#3061)
* ACS-4814 Use PR id for library publishing

* ACS-4814 Use PR id for library publishing
2023-03-14 04:25:48 -04:00

29 lines
771 B
YAML

name: "Update Library Versions"
description: "Updates ACA libraries according to the root Version"
inputs:
branch_name:
description: 'Name of the branch the workflow runs on'
required: true
type: string
dry-run:
description: dry run flag
required: true
type: boolean
runs:
using: "composite"
steps:
- name: Update Versions
shell: bash
run: |
VERSION_IN_PACKAGE_JSON=$(jq -cr '.version' < package.json)
if [[ ${{ inputs.branch_name }} =~ ^master.*?$ ]] ; then
NEW_LIBRARY_VERSION="$VERSION_IN_PACKAGE_JSON"
else
NEW_LIBRARY_VERSION="${VERSION_IN_PACKAGE_JSON}-${PR_NUMBER}"
fi
./scripts/gh/update-lib-versions.sh "$NEW_LIBRARY_VERSION" "${{ inputs.dry-run }}"