Skip to content

Commit

Permalink
add publisher set when dev release
Browse files Browse the repository at this point in the history
  • Loading branch information
BenAlvo1 committed Jan 30, 2025
1 parent 3abaa64 commit 45a376b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
required: false
default: true
type: boolean
publisherID:
description: 'Enter Publisher ID (ignore if not Dev release)'
required: false
type: string

env:
PUBLISHER: Checkmarx
Expand All @@ -26,13 +30,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set Extension ID
- name: Set Extension and Publisher ID
run: |
if [ "${{ inputs.dev }}" == "true" ]; then
echo "EXTENSION_ID=checkmarx-ast-azure-plugin-dev" >> $GITHUB_ENV
if [ -n "${{ inputs.publisherID }}" ]; then
echo "PUBLISHER_ID=${{ inputs.publisherID }}" >> $GITHUB_ENV
else
echo "EXTENSION_ID=checkmarx-ast-azure-plugin" >> $GITHUB_ENV
fi
- name: Set Publisher ID
run: |
if [ "${{ inputs.dev }}" == "true" ]; then
echo "PUBLISHER_ID=checkmarx-dev" >> $GITHUB_ENV
fi
- name: Tag
id: set_tag_name
Expand Down Expand Up @@ -104,11 +116,12 @@ jobs:
cat <<< $(jq ".version.Minor = ${{ env.MINOR_VERSION }}" ./cxAstScan/task.json) > ./cxAstScan/task.json
cat <<< $(jq ".version.Patch = ${{ env.PATCH_VERSION }}" ./cxAstScan/task.json) > ./cxAstScan/task.json
- name: Set ID field to dev and public to false if dev release
- name: Set ID public and publisher fields if dev release
run: |
if [ "${{ inputs.dev }}" == "true" ]; then
cat <<< $(jq ".public = false" vss-extension.json) > vss-extension.json
cat <<< $(jq ".id = \"${{ env.EXTENSION_ID }}\"" vss-extension.json) > vss-extension.json
cat <<< $(jq ".publisher = \"${{ inputs.publisherID }}\"" vss-extension.json) > vss-extension.json
fi
- name: Create extension
Expand Down

0 comments on commit 45a376b

Please sign in to comment.