[GHA] Add tag parameter to vscode release job for testing purposes

This commit is contained in:
aboyko
2024-07-14 13:23:54 -04:00
parent 2b42234088
commit 9e58651b49
2 changed files with 22 additions and 15 deletions

View File

@@ -11,6 +11,10 @@ on:
description: For example "RC1"
required: true
type: string
tag:
description: tag the git repo if value is 'true'
required: true
type: boolean
permissions:
contents: write
@@ -34,16 +38,19 @@ jobs:
id: version
run: |
base_version=`jq -r .version vscode-extensions/${{ inputs.extension-name }}/package.json`
release_name=${{ inputs.extension-name }}-${{ steps.version.outputs.version }}-${{ inputs.postfix }}
echo "Version: ${base_version}"
echo "version=$base_version" >> $GITHUB_OUTPUT
echo "release_name=$release_name" >> $GITHUB_OUTPUT
- name: Create tag
if: ${{ inputs.tag }}
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ inputs.extension-name }}-${{ steps.version.outputs.version }}-${{ inputs.postfix }}',
ref: 'refs/tags/${{ steps.version.outputs.release_name }}',
sha: context.sha
})
- name: Set up JDK 17
@@ -64,8 +71,8 @@ jobs:
s3_path=release/vscode-extensions/${{ inputs.extension-name }}/${{ steps.version.outputs.version }}
echo "S3 path: ${s3_path}"
aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive
aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/$vsix_file --no-progress
echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/$vsix_file" >> $GITHUB_OUTPUT
aws s3 cp ./vsix/$vsix_file s3://$AWS_S3_BUCKET/$s3_path/${{ steps.version.outputs.release_name }}.vsix --no-progress
echo "s3_url=${DOWNLOAD_URL_ROOT}/$s3_path/${{ steps.version.outputs.release_name }}.vsix" >> $GITHUB_OUTPUT
- id: tools-team-slack
uses: slackapi/slack-github-action@v1.26
env: