-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add Github Actions and Update Dependency Versions #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
db1f679
3f99013
1d47d56
28080ab
ed5e80f
7d8f120
9b62510
d419feb
845f9dd
fcf4171
205a7eb
d892053
aa3a775
e57bfea
0492f81
e060806
c8dea22
fa1882f
048e0fa
3b9fc14
c731b82
ce8e2af
ad0cad9
bbad2ff
0865b54
81f915b
cbd1569
e029c52
e053ccf
dd4d3ff
4d4b09e
1af8866
021f049
44b2f0c
1b503bf
a1bc4ab
f378152
8efc132
b60943f
b841c0e
9c65b13
05e1b75
d042508
a83d6b3
7aa3f39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # These owners will be the default owners for everything in | ||
| # the repo. Unless a later match takes precedence, | ||
| # @forcedotcom/pdt will be requested for | ||
| # review when someone opens a pull request. | ||
| * @salesforcecli/cli | ||
| #ECCN:Open Source | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| --- | ||
|
|
||
| <!-- | ||
| NOTICE: While GitHub is the preferred channel for reporting issues/feedback, this is not a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, please use official support channels. | ||
| --> | ||
|
|
||
| <!-- | ||
| FOR BUGS RELATED TO THE SALEFORCE CLI, please use this repository: https://github.com/forcedotcom/cli-packages | ||
| --> | ||
|
|
||
| ### Summary | ||
|
|
||
| _Short summary of what is going on or to provide context_. | ||
|
|
||
| ### Steps To Reproduce: | ||
|
|
||
| 1. This is step 1. | ||
| 1. This is step 2. All steps should start with '1.' | ||
|
|
||
| ### Expected result | ||
|
|
||
| _Describe what should have happened_. | ||
|
|
||
| ### Actual result | ||
|
|
||
| _Describe what actually happened instead_. | ||
|
|
||
| ### Additional information | ||
|
|
||
| _Feel free to attach a screenshot_. | ||
|
|
||
| **VS Code Version**: | ||
|
|
||
| **SFDX CLI Version**: | ||
|
|
||
| **OS and version**: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| name: Feature request | ||
| about: Suggest an idea for this project | ||
| --- | ||
|
|
||
| **Is your feature request related to a problem? Please describe.** | ||
| A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
|
||
| **Describe the solution you'd like** | ||
| A clear and concise description of what you want to happen. | ||
|
|
||
| **Describe alternatives you've considered** | ||
| A clear and concise description of any alternative solutions or features you've considered. | ||
|
|
||
| **Additional context** | ||
| Add any other context or screenshots about the feature request here. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ### What does this PR do? | ||
|
|
||
| ### What issues does this PR fix or reference? |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: 'npm' | ||
| directory: '/' | ||
| schedule: | ||
| interval: 'weekly' | ||
| day: 'saturday' | ||
| versioning-strategy: 'increase' | ||
| labels: | ||
| - 'dependencies' | ||
| open-pull-requests-limit: 5 | ||
| pull-request-branch-name: | ||
| separator: '-' | ||
| commit-message: | ||
| # cause a release for non-dev-deps | ||
| prefix: fix(deps) | ||
| # no release for dev-deps | ||
| prefix-development: chore(dev-deps) | ||
| ignore: | ||
| - dependency-name: '@salesforce/dev-scripts' | ||
| - dependency-name: '*' | ||
| update-types: ['version-update:semver-major'] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: automerge | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '42 2,5,8,11 * * *' | ||
|
|
||
| jobs: | ||
| automerge: | ||
| uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| name: devScripts | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '50 6 * * 0' | ||
|
|
||
| jobs: | ||
| update: | ||
| uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: failureNotifications | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - version, tag and github release | ||
| - publish | ||
| types: | ||
| - completed | ||
|
|
||
| jobs: | ||
| failure-notify: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
| steps: | ||
| - name: Announce Failure | ||
| id: slack | ||
| uses: slackapi/slack-github-action@v1.21.0 | ||
| env: | ||
| # for non-CLI-team-owned plugins, you can send this anywhere you like | ||
| SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }} | ||
| SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
| with: | ||
| # Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D | ||
| # Only copy over the "blocks" array to the Block Kit Builder | ||
| payload: | | ||
| { | ||
| "text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}", | ||
| "blocks": [ | ||
| { | ||
| "type": "header", | ||
| "text": { | ||
| "type": "plain_text", | ||
| "text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:" | ||
| } | ||
| }, | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}" | ||
| } | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: manual release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
| - name: Conventional Changelog Action | ||
| id: changelog | ||
| uses: TriPSs/conventional-changelog-action@d360fad3a42feca6462f72c97c165d60a02d4bf2 | ||
| # overriding some of the basic behaviors to just get the changelog | ||
| with: | ||
| git-user-name: svc-cli-bot | ||
| git-user-email: svc_cli_bot@salesforce.com | ||
| github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
| output-file: false | ||
| # always do the release, even if there are no semantic commits | ||
| skip-on-empty: false | ||
| tag-prefix: '' | ||
| - uses: notiz-dev/github-action-json-property@2192e246737701f108a4571462b76c75e7376216 | ||
| id: packageVersion | ||
| with: | ||
| path: 'package.json' | ||
| prop_path: 'version' | ||
| - name: Create Github Release | ||
| uses: actions/create-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} | ||
| with: | ||
| tag_name: ${{ steps.packageVersion.outputs.prop }} | ||
| release_name: ${{ steps.packageVersion.outputs.prop }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Pull Request Slack Notification | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Notify Slack on PR open | ||
| env: | ||
| WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} | ||
| PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }} | ||
| PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }} | ||
| PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} | ||
| PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }} | ||
| PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }} | ||
| PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} | ||
| PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} | ||
| PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }} | ||
| PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }} | ||
| uses: salesforcecli/github-workflows/.github/actions/prNotification@main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # test | ||
| name: version, tag and github release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - prerelease/* | ||
| tags-ignore: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| release: | ||
| uses: salesforcecli/github-workflows/.github/workflows/githubRelease.yml@main | ||
| secrets: inherit | ||
| with: | ||
| prerelease: ${{ github.ref_name != 'main' }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: publish | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| # support manual release in case something goes wrong and needs to be repeated or tested | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: tag that needs to publish | ||
| type: string | ||
| required: true | ||
| jobs: | ||
| getDistTag: | ||
| outputs: | ||
| tag: ${{ steps.distTag.outputs.tag }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| with: | ||
| ref: ${{ github.event.release.tag_name || inputs.tag }} | ||
| - uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main | ||
| id: distTag | ||
| npm: | ||
| uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main | ||
| needs: [getDistTag] | ||
| with: | ||
| ctc: true | ||
| sign: true | ||
iowillhoit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} | ||
| githubTag: ${{ github.event.release.tag_name || inputs.tag }} | ||
| secrets: inherit | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: tests | ||
| on: | ||
| push: | ||
| branches-ignore: [main] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| yarn-lockfile-check: | ||
| uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main | ||
| # Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs | ||
| linux-unit-tests: | ||
| needs: yarn-lockfile-check | ||
| uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main | ||
| windows-unit-tests: | ||
| needs: linux-unit-tests | ||
| uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main | ||
| # nuts: | ||
| # needs: linux-unit-tests | ||
| # uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main | ||
| # secrets: inherit | ||
| # strategy: | ||
| # matrix: | ||
| # os: [ubuntu-latest, windows-latest] | ||
| # fail-fast: false | ||
| # with: | ||
| # os: ${{ matrix.os }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: pr-validation | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, edited] | ||
| # only applies to PRs that want to merge to main | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| pr-validation: | ||
| uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@main |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,11 @@ | |
| { | ||
| "type": "node", | ||
| "request": "attach", | ||
| "name": "Attach", | ||
| "name": "Attach to Remote", | ||
| "address": "127.0.0.1", | ||
| "port": 9229, | ||
| "skipFiles": ["<node_internals>/**"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know enough about this file's config. Is there a reason you removed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I must have added skip files while copying from elsewhere during dev. In the launch.json in the old monorepo, this configuration did not have the |
||
| "localRoot": "${workspaceFolder}", | ||
| "remoteRoot": "${workspaceFolder}" | ||
| }, | ||
| { | ||
| "name": "Run All Tests", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,12 @@ | ||
| Copyright (c) 2020, Salesforce.com, inc. | ||
| Copyright (c) 2023, Salesforce.com, Inc. | ||
| All rights reserved. | ||
|
|
||
| Redistribution and use in source and binary forms, with or without modification, | ||
| are permitted provided that the following conditions are met: | ||
| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
|
||
| * Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
| * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
|
||
| * Redistributions in binary form must reproduce the above copyright notice, this | ||
| list of conditions and the following disclaimer in the documentation and/or | ||
| other materials provided with the distribution. | ||
| * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
|
||
| * Neither the name of Salesforce.com nor the names of its contributors may be | ||
| used to endorse or promote products derived from this software without specific | ||
| prior written permission. | ||
| * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR | ||
| ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
| (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Uh oh!
There was an error while loading. Please reload this page.