mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
* [ACS-7241] Parallel releases support v1 * [ACS-7241] Add missing needs clauses * [ACS-7241] Proper conditional job check * [ACS-7241] Revert testing changes, namespace fix * [ACS-7241] Add improved conditions
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: "Variables setup"
|
|
description: "Variables setup"
|
|
|
|
inputs:
|
|
npm_tag:
|
|
description: 'NPM tag'
|
|
required: false
|
|
type: string
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: setup variables
|
|
shell: bash
|
|
run: |
|
|
echo "BUILD_OPTS=--configuration=production,e2e" >> $GITHUB_ENV
|
|
echo "TEST_OPTS=" >> $GITHUB_ENV
|
|
echo "E2E_TSCONFIG=tsconfig.e2e.json" >> $GITHUB_ENV
|
|
echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
|
echo "HEAD_HASH=HEAD" >> $GITHUB_ENV
|
|
|
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v8.16.0
|
|
- name: set TAG_NPM
|
|
shell: bash
|
|
run: |
|
|
if [[ -n "${{ inputs.npm_tag }}" ]]; then
|
|
TAG_NPM=${{ inputs.npm_tag }}
|
|
else
|
|
TAG_NPM="alpha"
|
|
VERSION_IN_PACKAGE_JSON=$(jq -cr '.version' < package.json)
|
|
|
|
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
|
|
|
|
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]] || [[ $BRANCH_NAME == release/* ]]; then
|
|
# Pre-release versions
|
|
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
|
|
then
|
|
TAG_NPM=next
|
|
# Stable major versions
|
|
else
|
|
TAG_NPM=latest
|
|
fi
|
|
fi
|
|
|
|
if [[ $BRANCH_NAME =~ ^develop(-patch.*)?$ ]]; then
|
|
TAG_NPM=alpha
|
|
fi
|
|
fi
|
|
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
|