Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/npmPublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ on:
required: false
ctc:
description: |
Use CTC. Requires environment to contain
SF_CHANGE_CASE_SFDX_AUTH_URL, SF_CHANGE_CASE_TEMPLATE_ID, SF_CHANGE_CASE_CONFIGURATION_ITEM.
Also requires a static ip runner (you can't use ubuntu-latest)
Use CTC.
- Only opens when publishing to 'latest'. Will NOT open for prerelease tags (e.g. dev, beta, qa)
- Requires env vars: SF_CHANGE_CASE_SFDX_AUTH_URL, SF_CHANGE_CASE_TEMPLATE_ID, SF_CHANGE_CASE_CONFIGURATION_ITEM.
- Requires a static IP runner (you cannot use ubuntu-latest)
type: boolean
required: false
runsOn:
Expand Down Expand Up @@ -108,15 +109,16 @@ jobs:

ctc-open:
needs: [check-publish]
if: inputs.ctc && needs.check-publish.outputs.published == 'false'
# CTC will only open when publishing to 'latest'
if: inputs.ctc && needs.check-publish.outputs.published == 'false' && inputs.tag == 'latest'
uses: salesforcecli/github-workflows/.github/workflows/ctcOpen.yml@main
with:
githubTag: ${{ inputs.githubTag }}
secrets: inherit

npm-publish:
needs: [check-publish, ctc-open]
if: ${{ always() && needs.check-publish.outputs.published == 'false' && (!inputs.ctc || (inputs.ctc && needs.ctc-open.outputs.changeCaseId)) }}
if: ${{ always() && needs.check-publish.outputs.published == 'false' && (!inputs.ctc || (inputs.ctc && inputs.tag != 'latest') || (inputs.ctc && needs.ctc-open.outputs.changeCaseId)) }}
runs-on: ${{ inputs.runsOn }}
env:
INPUTS_PACKAGE_MANAGER: ${{ inputs.packageManager }}
Expand Down