TP-39914 | test
This commit is contained in:
39
.github/workflows/codePush.yml
vendored
39
.github/workflows/codePush.yml
vendored
@@ -23,9 +23,9 @@ on:
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: [default]
|
||||
# outputs:
|
||||
# package_version: ${{ steps.get_version.outputs.version }}
|
||||
# build_number: ${{ steps.get_package_info.outputs.buildNumber }}
|
||||
outputs:
|
||||
package_version: ${{ steps.get_version.outputs.version }}
|
||||
build_number: ${{ steps.get_package_info.outputs.buildNumber }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -42,6 +42,7 @@ jobs:
|
||||
VERSION=$(node -p "require('./package.json').version")
|
||||
BUILD_NUMBER=$(node -p "require('./package.json').buildNumber")
|
||||
echo "version=$VERSION" >> $GITHUB_ENV
|
||||
echo "Extracted version is $VERSION"
|
||||
echo "Set version to $VERSION"
|
||||
echo "buildNumber=$BUILD_NUMBER" >> $GITHUB_ENV
|
||||
echo "Set buildNumber to $BUILD_NUMBER"
|
||||
@@ -71,24 +72,22 @@ jobs:
|
||||
token: ${{ secrets.MY_REPO_PAT }}
|
||||
submodules: recursive
|
||||
persist-credentials: true
|
||||
# Added step for debugging
|
||||
- name: Print environment variables
|
||||
run: |
|
||||
echo "Version from environment: $version"
|
||||
echo "Build number from environment: $buildNumber"
|
||||
|
||||
# - name: Check if tag exists
|
||||
# id: check_tag
|
||||
# run: |
|
||||
# TAG_NAME="${{ env.version }}"
|
||||
# EXISTING_TAG=$(git ls-remote --tags origin refs/tags/$TAG_NAME)
|
||||
# if [[ -z "$EXISTING_TAG" ]]; then
|
||||
# echo "Tag $TAG_NAME does not exist."
|
||||
# echo "tag_exists=false" >> $GITHUB_ENV
|
||||
# else
|
||||
# echo "Tag $TAG_NAME already exists."
|
||||
# echo "tag_exists=true" >> $GITHUB_ENV
|
||||
# fi
|
||||
- name: Check if tag exists
|
||||
id: check_tag
|
||||
run: |
|
||||
TAG_NAME="${{ needs.generate.outputs.package_version }}"
|
||||
EXISTING_TAG=$(git ls-remote --tags origin refs/tags/$TAG_NAME)
|
||||
if [[ -z "$EXISTING_TAG" ]]; then
|
||||
echo "Tag $TAG_NAME does not exist."
|
||||
echo "tag_exists=false" >> $GITHUB_ENV
|
||||
else
|
||||
echo "Tag $TAG_NAME already exists."
|
||||
echo "tag_exists=true" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: check tag
|
||||
run: echo ${{ env.tag_exists }}
|
||||
|
||||
# - name: Create and push tag
|
||||
# if: env.tag_exists == 'false'
|
||||
|
||||
Reference in New Issue
Block a user