Release v59.12.0 #45
Workflow file for this run
This file contains 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: | |
publish-start-notification: | |
name: "Publish in MS Marketplace Start Notification" | |
uses: ./.github/workflows/slackNotification.yml | |
secrets: inherit | |
with: | |
title: "Publish in MS Marketplace waiting for approval in github." | |
notification: "New Release triggered publish build and job is ready for approval." | |
type: "notification" | |
workflow: "publishVSCode.yml" | |
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@v3 | |
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@v3 | |
with: | |
ref: 'main' | |
token: ${{ secrets.IDEE_GH_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: downloadExtensionsFromRelease | |
run: | | |
mkdir ./extensions | |
gh release download v${{ env.PUBLISH_VERSION }} -D ./extensions | |
- name: Display downloaded vsix files | |
run: ls -R ./extensions | |
- run: npm ci | |
- run: find ./extensions -type f -name "*.vsix" -exec npx vsce publish --pat ${{ env.VSCE_PERSONAL_ACCESS_TOKEN }} --packagePath {} \; | |
- run: 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 |