build(deps): bump @salesforce/source-deploy-retrieve from 12.31.16 to 12.31.19 #124
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: NPM Service | |
| on: | |
| release: | |
| types: [published] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| paths-ignore: | |
| - "**.md" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| # Manage concurrency to stop running jobs and start new ones in case of new commit pushed | |
| concurrency: | |
| group: ${{ github.ref }}-${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish: | |
| if: github.event_name == 'release' || github.actor != 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| channel: ${{ steps.publish.outputs.channel }} | |
| permissions: | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| registry-url: "https://registry.npmjs.org" | |
| - run: npm install -g npm@latest | |
| - uses: ./.github/actions/install | |
| # Dev version setup (PR only) | |
| - name: Compute dev version | |
| if: github.event_name == 'pull_request' | |
| id: version | |
| run: | | |
| CURRENT_VERSION=$(jq -r '.version' package.json) | |
| DEV_CHANNEL="dev-${{ github.event.pull_request.number }}" | |
| DEV_VERSION="${CURRENT_VERSION}-${DEV_CHANNEL}.${{ github.run_id }}-${{ github.run_attempt }}" | |
| echo "channel=$DEV_CHANNEL" >> "$GITHUB_OUTPUT" | |
| echo "version=$DEV_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Set dev version | |
| if: github.event_name == 'pull_request' | |
| env: | |
| DEV_CHANNEL: ${{ steps.version.outputs.channel }} | |
| run: | | |
| git config --global user.email "${DEV_CHANNEL}@github.com" | |
| git config --global user.name "$DEV_CHANNEL" | |
| npm version "${{ steps.version.outputs.version }}" --no-git-tag-version | |
| # Publish (unified with conditional channel) | |
| - name: Publish | |
| id: publish | |
| env: | |
| DEV_CHANNEL: ${{ steps.version.outputs.channel }} | |
| RELEASE_TAG: ${{ github.event.release.tag_name }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| run: | | |
| if [ "$EVENT_NAME" = "pull_request" ]; then | |
| CHANNEL="$DEV_CHANNEL" | |
| else | |
| CHANNEL="latest-rc" | |
| fi | |
| npm publish --provenance --access public --tag "$CHANNEL" | |
| # For e2e: PR uses dev channel, release uses tag name (e.g., v1.5.0) | |
| if [ "$EVENT_NAME" = "pull_request" ]; then | |
| echo "channel=$DEV_CHANNEL" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "channel=$RELEASE_TAG" >> "$GITHUB_OUTPUT" | |
| fi | |
| # Comment PR (PR only) | |
| - name: Comment PR | |
| if: github.event_name == 'pull_request' | |
| uses: thollander/actions-comment-pull-request@v3 | |
| env: | |
| DEV_CHANNEL: ${{ steps.version.outputs.channel }} | |
| with: | |
| message: | | |
| Published under `${{ env.DEV_CHANNEL }}` npm channel. | |
| ```sh | |
| $ sf plugins install sfdx-git-delta@${{ env.DEV_CHANNEL }} | |
| ``` | |
| comment-tag: dev-publish | |
| mode: recreate | |
| e2e-tests: | |
| needs: [publish] | |
| uses: ./.github/workflows/run-e2e-tests.yml | |
| with: | |
| channel: ${{ needs.publish.outputs.channel }} |