Skip to content

Commit 8527f6d

Browse files
committed
feat(salesforcecli): merge main to get new workflows
2 parents 41f4c8e + dd18f2c commit 8527f6d

File tree

8 files changed

+95
-40
lines changed

8 files changed

+95
-40
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ NOTICE: While GitHub is the preferred channel for reporting issues/feedback, thi
88
-->
99

1010
<!--
11-
FOR BUGS RELATED TO THE SALEFORCE CLI, please use this repository: https://github.com/forcedotcom/cli-packages
11+
FOR BUGS RELATED TO THE SALEFORCE CLI, please use this repository: https://github.com/forcedotcom/cli/issues
1212
-->
1313

1414
### Summary
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: create-github-release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- prerelease/**
8+
tags-ignore:
9+
- '*'
10+
workflow_dispatch:
11+
inputs:
12+
prerelease:
13+
type: string
14+
description: 'Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here.'
15+
16+
jobs:
17+
release:
18+
uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main
19+
secrets: inherit
20+
with:
21+
prerelease: ${{ inputs.prerelease }}
22+
# If this is a push event, we want to skip the release if there are no semantic commits
23+
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty
24+
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.)
25+
skip-on-empty: ${{ github.event_name == 'push' }}
26+
# docs:
27+
# # Most repos won't use this
28+
# # Depends on the 'release' job to avoid git collisions, not for any functionality reason
29+
# needs: release
30+
# secrets: inherit
31+
# if: ${{ github.ref_name == 'main' }}
32+
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main

.github/workflows/failureNotifications.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: failureNotifications
33
on:
44
workflow_run:
55
workflows:
6-
- version, tag and github release
76
- publish
7+
- create-github-release
88
types:
99
- completed
1010

@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Announce Failure
1717
id: slack
18-
uses: slackapi/slack-github-action@v1.21.0
18+
uses: slackapi/slack-github-action@v1.24.0
1919
env:
2020
# for non-CLI-team-owned plugins, you can send this anywhere you like
2121
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pull Request Slack Notification
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify Slack on PR open
12+
env:
13+
WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
14+
PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }}
15+
PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }}
16+
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }}
17+
PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
18+
PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
19+
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
20+
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }}
21+
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }}
22+
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
23+
uses: salesforcecli/github-workflows/.github/actions/prNotification@main

.github/workflows/onRelease.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,35 @@ name: publish
22

33
on:
44
release:
5-
types: [released]
5+
# both release and prereleases
6+
types: [published]
67
# support manual release in case something goes wrong and needs to be repeated or tested
78
workflow_dispatch:
89
inputs:
910
tag:
10-
description: tag that needs to publish
11+
description: github tag that needs to publish
1112
type: string
1213
required: true
14+
1315
jobs:
16+
# parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0)
17+
getDistTag:
18+
outputs:
19+
tag: ${{ steps.distTag.outputs.tag }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
ref: ${{ github.event.release.tag_name || inputs.tag }}
25+
- uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
26+
id: distTag
27+
1428
npm:
1529
uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
30+
needs: [getDistTag]
1631
with:
1732
ctc: true
1833
sign: true
19-
tag: latest
34+
tag: ${{ needs.getDistTag.outputs.tag || 'latest' }}
2035
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
2136
secrets: inherit

.github/workflows/slackprnotification.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@oclif/errors": "^1",
1111
"@salesforce/command": "^4.2.1",
1212
"@salesforce/core": "^2.37.1",
13-
"@types/lodash.chunk": "^4.2.8",
13+
"@types/lodash.chunk": "^4.2.9",
1414
"lodash.chunk": "^4.2.0",
1515
"open": "^8.4.2",
1616
"tslib": "^2"
@@ -25,7 +25,7 @@
2525
"@salesforce/plugin-command-reference": "^1.4.7",
2626
"@salesforce/prettier-config": "^0.0.3",
2727
"@salesforce/ts-sinon": "^1",
28-
"@types/jsforce": "^1.11.3",
28+
"@types/jsforce": "^1.11.4",
2929
"@typescript-eslint/eslint-plugin": "^4.2.0",
3030
"@typescript-eslint/parser": "^4.2.0",
3131
"chai": "^4.3.10",
@@ -114,4 +114,4 @@
114114
"pre-push": "sf-husky-pre-push"
115115
}
116116
}
117-
}
117+
}

yarn.lock

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
# yarn lockfile v1
33

44

5+
"@ampproject/remapping@^2.1.0":
6+
version "2.1.2"
7+
resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz"
8+
integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==
9+
dependencies:
10+
"@jridgewell/trace-mapping" "^0.3.0"
11+
12+
"@babel/[email protected]", "@babel/code-frame@^7.0.0":
513
"@ampproject/remapping@^2.1.0":
614
version "2.1.2"
715
resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz"
@@ -1150,10 +1158,10 @@
11501158
dependencies:
11511159
"@types/node" "*"
11521160

1153-
"@types/jsforce@^1.11.3", "@types/jsforce@^1.9.41":
1154-
version "1.11.3"
1155-
resolved "https://registry.yarnpkg.com/@types/jsforce/-/jsforce-1.11.3.tgz#561631e25fb9aa39f30accf26d9e4d9f3fd9924f"
1156-
integrity sha512-3M4+uuGaqUQqG+Cb+IDx8xaQIw+s6xW69rvMc7LQm6KzFZtady9KiokNsvyxHwWBrsLJ/PGA10A2N3kMDI6StQ==
1161+
"@types/jsforce@^1.11.4", "@types/jsforce@^1.9.41":
1162+
version "1.11.4"
1163+
resolved "https://registry.yarnpkg.com/@types/jsforce/-/jsforce-1.11.4.tgz#96c484584929e5d8d60afeaab820f767336a29e1"
1164+
integrity sha512-bgMESDt7cgupb7WM2DtKKEnhHz/aPRSwgz6HyAVmwV1Z2eClARiLJ/pQ7XfytY7Rao3DQKNA8YkUsURF9BR4xQ==
11571165
dependencies:
11581166
"@types/node" ">=4.0"
11591167

@@ -1172,10 +1180,10 @@
11721180
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
11731181
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
11741182

1175-
"@types/lodash.chunk@^4.2.8":
1176-
version "4.2.8"
1177-
resolved "https://registry.yarnpkg.com/@types/lodash.chunk/-/lodash.chunk-4.2.8.tgz#12212b6053cf00831b9152ab7eb9e97e9a90d739"
1178-
integrity sha512-wSUIKYp9PMko5SjZIbdoy7mRiEXAVXWFS3kFQu5wDl6+DtFBJ5OvtD62kJIJ+rH3ELPLijUr2gV3EVT+iqO1og==
1183+
"@types/lodash.chunk@^4.2.9":
1184+
version "4.2.9"
1185+
resolved "https://registry.yarnpkg.com/@types/lodash.chunk/-/lodash.chunk-4.2.9.tgz#60da44c404dfa8b01b426034c1183e5eb9b09727"
1186+
integrity sha512-Z9VtFUSnmT0No/QymqfG9AGbfOA4O5qB/uyP89xeZBqDAsKsB4gQFTqt7d0pHjbsTwtQ4yZObQVHuKlSOhIJ5Q==
11791187
dependencies:
11801188
"@types/lodash" "*"
11811189

0 commit comments

Comments
 (0)