[ACA-4653] Migrate release workflow to GHA (#3027)

* [ACA-4653] Run ACA upstream on schedule

* [ACA-4653] Migrate release workflow to GHA

* [ACA-4653] Consistency in naming

* [ACA-4653] Use GH action to configure GH author

* [ACA-4653] Dedicated sh for publish Docker image job

* [ACA-4653] Add missing variables

* [ACA-4653] Delete Travis.yml

* [ACA-4653] CR fixes

* [ACA-4653] Add branch name as action input

* [ACA-4653] Proper env var usage in workflow
This commit is contained in:
MichalKinas
2023-03-03 12:40:37 -05:00
committed by GitHub
parent 3294606fc0
commit e38e72a8e0
10 changed files with 394 additions and 129 deletions
+38
View File
@@ -0,0 +1,38 @@
name: "Variables setup"
description: "Variables setup"
runs:
using: "composite"
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.35.0
- name: setup variables
shell: bash
run: |
echo "BUILD_OPTS=--configuration=production,e2e" >> $GITHUB_ENV
echo "TEST_OPTS=" >> $GITHUB_ENV
echo "E2E_PROTRACTOR_OPTS=" >> $GITHUB_ENV
echo "E2E_TSCONFIG=tsconfig.e2e.json" >> $GITHUB_ENV
echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "SMART_RUNNER_DIRECTORY=.protractor-smartrunner" >> $GITHUB_ENV
echo "BASE_HASH=.protractor-smartrunner" >> $GITHUB_ENV
echo "HEAD_HASH=HEAD" >> $GITHUB_ENV
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.35.0
- name: set TAG_NPM
shell: bash
run: |
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]]; 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
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV