TP-39914 | fix

This commit is contained in:
Aman Chaturvedi
2024-03-12 12:00:26 +05:30
parent ec8c5fa7e4
commit 7a394b7899

View File

@@ -85,38 +85,36 @@ jobs:
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'
# run: |
# TAG_NAME="${{ env.version }}"
# # git config --local user.email "${{ github.actor }}@github.com"
# git config --local user.name "${{ github.actor }}"
# git tag $TAG_NAME
# git push origin $TAG_NAME
# env:
# GITHUB_TOKEN: ${{ secrets.MY_REPO_PAT }}
# - name: Create release tag
# run: |
# TAG_NAME="${{ env.version }}"
# RELEASE_NAME="Release $TAG_NAME"
# DESCRIPTION="${{ github.event.inputs.description }}"
# REPO="navi-medici/address-verification-app"
# BRANCH_NAME="${GITHUB_REF#refs/heads/}"
- name: Create and push tag
if: env.tag_exists == 'false'
run: |
TAG_NAME="${{ needs.generate.outputs.package_version }}"
# git config --local user.email "${{ github.actor }}@github.com"
git config --local user.name "${{ github.actor }}"
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.MY_REPO_PAT }}
- name: Create release tag
run: |
TAG_NAME="${{ needs.generate.outputs.package_version }}"
BUILD_NUMBER="${{ needs.generate.outputs.build_number }}"
RELEASE_NAME="$TAG_NAME (build $BUILD_NUMBER) code push"
DESCRIPTION="${{ github.event.inputs.description }}"
REPO="navi-medici/address-verification-app"
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
# curl -X POST \
# -H "Authorization: token ${{ secrets.MY_REPO_PAT }}" \
# -H "Content-Type: application/json" \
# -d "{
# \"tag_name\": \"$TAG_NAME\",
# \"target_commitish\": \"$BRANCH_NAME\",
# \"name\": \"$RELEASE_NAME\",
# \"body\": \"$DESCRIPTION\",
# \"draft\": false,
# \"prerelease\": false
# }" \
# "https://api.github.com/repos/$REPO/releases"
# shell: bash
curl -X POST \
-H "Authorization: token ${{ secrets.MY_REPO_PAT }}" \
-H "Content-Type: application/json" \
-d "{
\"tag_name\": \"$TAG_NAME\",
\"target_commitish\": \"$BRANCH_NAME\",
\"name\": \"$RELEASE_NAME\",
\"body\": \"$DESCRIPTION\",
\"draft\": false,
\"prerelease\": false
}" \
"https://api.github.com/repos/$REPO/releases"
shell: bash