soql-common-v1.0.1 #165
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish in Microsoft Marketplace | |
| on: | |
| release: | |
| # This limits the workflow to releases that are not pre-releases | |
| # From the docs: A release was published, or a pre-release was changed to a release. | |
| types: [released] | |
| # Button for publishing main branch in case there is a failure on the release. | |
| workflow_dispatch: | |
| jobs: | |
| prepare-environment-from-main: | |
| name: 'Get Release Version' | |
| runs-on: ubuntu-latest | |
| environment: publish | |
| outputs: | |
| RELEASE_VERSION: ${{ steps.getMainVersion.outputs.version }} | |
| GUS_BUILD: ${{ steps.getGusBuild.outputs.gusBuild}} | |
| SF_CHANGE_CASE_SCHEDULE_BUILD: ${{ steps.getScheduledBuild.outputs.sfChangeCaseScheduleBuild }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: 'main' | |
| - id: getMainVersion | |
| run: | | |
| echo "version="$(node -pe "require('./packages/salesforcedx-vscode/package.json').version")"" >> $GITHUB_OUTPUT | |
| - run: echo "Main Version is ${{ steps.getMainVersion.outputs.version }}" | |
| - id: getGusBuild | |
| run: | | |
| echo "gusBuild=${{ steps.getMainVersion.outputs.version }}" >> $GITHUB_OUTPUT | |
| - run: echo "GUS BUILD is ${{ steps.getGusBuild.outputs.gusBuild }}" | |
| - id: getScheduledBuild | |
| run: | | |
| echo "sfChangeCaseScheduleBuild=offcore.tooling.${{ steps.getMainVersion.outputs.version }}" >> $GITHUB_OUTPUT | |
| - run: echo "SF_CHANGE_CASE_SCHEDULE_BUILD is ${{ steps.getScheduledBuild.outputs.sfChangeCaseScheduleBuild }}"\ | |
| ctc-open: | |
| needs: [prepare-environment-from-main] | |
| uses: salesforcecli/github-workflows/.github/workflows/ctcOpen.yml@main | |
| secrets: inherit | |
| publish: | |
| needs: ['ctc-open', 'prepare-environment-from-main'] | |
| runs-on: ubuntu-latest | |
| env: | |
| VSCE_PERSONAL_ACCESS_TOKEN: ${{ secrets.VSCE_PERSONAL_ACCESS_TOKEN }} | |
| PUBLISH_VERSION: ${{ needs.prepare-environment-from-main.outputs.RELEASE_VERSION }} | |
| GITHUB_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'main' | |
| token: ${{ secrets.IDEE_GH_TOKEN }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ vars.NODE_VERSION || 'lts/*' }} | |
| - name: downloadExtensionsFromRelease | |
| run: | | |
| mkdir ./extensions | |
| gh release download v${{ env.PUBLISH_VERSION }} -D ./extensions | |
| - name: Display downloaded vsix files | |
| run: ls -R ./extensions | |
| - uses: salesforcecli/github-workflows/.github/actions/npmInstallWithRetries@main | |
| - run: | | |
| cmd=$(find . -type f -name "*.vsix" -print0 | xargs -0 -I {} printf 'npx vsce publish --skip-duplicate --pat "%s" --packagePath "%s" && ' "${VSCE_PERSONAL_ACCESS_TOKEN}" '{}' | sed 's/ && $//')&&[ -n "$cmd" ] && eval "$cmd" && echo "SUCCESSFULLY published" | |
| ctcCloseSuccess: | |
| needs: [ctc-open, publish] | |
| if: needs.ctc-open.result == 'success' && needs.publish.result == 'success' && needs.ctc-open.outputs.changeCaseId | |
| uses: salesforcecli/github-workflows/.github/workflows/ctcClose.yml@main | |
| secrets: inherit | |
| with: | |
| changeCaseId: ${{needs.ctc-open.outputs.changeCaseId}} | |
| ctcCloseFail: | |
| needs: [ctc-open, publish] | |
| if: always() && inputs.ctc && needs.ctc-open.outputs.changeCaseId && (needs.ctc-open.result != 'success' || needs.publish.result != 'success') | |
| uses: salesforcecli/github-workflows/.github/workflows/ctcClose.yml@main | |
| secrets: inherit | |
| with: | |
| changeCaseId: ${{ needs.ctc-open.outputs.changeCaseId }} | |
| status: Not Implemented |