Skip to content

Commit 9bbf4b0

Browse files
committed
Merge remote-tracking branch 'origin/main' into v4-sync
* origin/main: remove default channel (#73) Don't fail overall if Slack announcement fails (#69) Improve Dry Run Output (#64) 5.0.0 (#67) Fix Yarn 4 compatibility (#65) Disallow publishing packages with version 0.0.0 (#63) Run linting and testing GitHub workflows on PRs (#62) Enabling MetaMask security code scanner (#60) Add Shared Libraries team in codeowners file (#59) Update README.md (#56) Update README.md (#55) Update README.md (#54) Bump word-wrap from 1.2.3 to 1.2.4 (#53)
2 parents 40642af + 2490387 commit 9bbf4b0

File tree

14 files changed

+121
-17
lines changed

14 files changed

+121
-17
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Lines starting with '#' are comments.
22
# Each line is a file pattern followed by one or more owners.
33

4-
* @MetaMask/devs
4+
* @MetaMask/shared-libraries-engineers
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 'MetaMask Security Code Scanner'
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
jobs:
10+
run-security-scan:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
actions: read
14+
contents: read
15+
security-events: write
16+
steps:
17+
- name: MetaMask Security Code Scanner
18+
uses: MetaMask/Security-Code-Scanner@main
19+
with:
20+
repo: ${{ github.repository }}
21+
paths_ignored: |
22+
.storybook/
23+
'**/__snapshots__/'
24+
'**/*.snap'
25+
'**/*.stories.js'
26+
'**/*.stories.tsx'
27+
'**/*.test.browser.ts*'
28+
'**/*.test.js*'
29+
'**/*.test.ts*'
30+
'**/fixtures/'
31+
'**/jest.config.js'
32+
'**/jest.environment.js'
33+
'**/mocks/'
34+
'**/test*/'
35+
docs/
36+
e2e/
37+
merged-packages/
38+
node_modules
39+
storybook/
40+
test*/
41+
rules_excluded: example
42+
project_metrics_token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
43+
slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}

.github/workflows/shellcheck.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: shellcheck
33
permissions:
44
checks: write
55

6-
on: [push]
6+
on:
7+
push:
8+
branches: [main]
9+
pull_request:
710

811
jobs:
912
lint:

.github/workflows/test-monorepo.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: test-monorepo
2-
on: [push]
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
36
jobs:
47
# test npm publish dry-run
58
checkout_publish_skunkworks_dry_run:

.github/workflows/test-polyrepo.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: test-polyrepo
2-
on: [push]
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
36
jobs:
47
# test npm publish dry-run
58
checkout_publish_controllers_dry_run:

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: test
2-
on: [push]
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
36
jobs:
47
test:
58
runs-on: ubuntu-20.04

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [5.0.0]
10+
### Changed
11+
- **BREAKING:** Disallow publishing packages with version 0.0.0 ([#63](https://github.com/MetaMask/action-npm-publish/pull/63))
12+
13+
### Fixed
14+
- Fix Yarn 4 compatibility ([#65](https://github.com/MetaMask/action-npm-publish/pull/65))
15+
916
## [4.0.3]
1017
### Fixed
1118
- Fix Slack announcement for public default channel ([#73](https://github.com/MetaMask/action-npm-publish/pull/73))
@@ -84,7 +91,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8491
### Changed
8592
- Initial release ([#1](https://github.com/MetaMask/action-npm-publish/pull/1))
8693

87-
[Unreleased]: https://github.com/MetaMask/action-npm-publish/compare/v4.0.3...HEAD
94+
[Unreleased]: https://github.com/MetaMask/action-npm-publish/compare/v5.0.0...HEAD
95+
[5.0.0]: https://github.com/MetaMask/action-npm-publish/compare/v4.0.3...v5.0.0
8896
[4.0.3]: https://github.com/MetaMask/action-npm-publish/compare/v4.0.2...v4.0.3
8997
[4.0.2]: https://github.com/MetaMask/action-npm-publish/compare/v4.0.1...v4.0.2
9098
[4.0.1]: https://github.com/MetaMask/action-npm-publish/compare/v4.0.0...v4.0.1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ We've added the ability to customize the message posted in Slack and those optio
5555

5656
- `icon-url`
5757
- `username`
58-
- `target-name`
58+
- `subteam`
5959
- `channel`
6060

6161
example:
@@ -67,7 +67,7 @@ example:
6767
icon-url: https://ricky.codes/me.jpg
6868
username: rickybot
6969
# re subteam, see: https://api.slack.com/reference/surfaces/formatting#mentioning-groups
70-
subteam: subteam: S042S7RE4AE # @metamask-npm-publishers
70+
subteam: S042S7RE4AE # @metamask-npm-publishers
7171
channel: dev-channel
7272
```
7373

@@ -87,5 +87,5 @@ You can read more about these option in the [API](#API) section below
8787

8888
- **`icon-url`** _(optional)_. Url to the avatar used for the bot in Slack. If not set this defaults to the avatar in this repository.
8989
- **`username`** _(optional)_. The name of the bot as it appears on Slack. If not set this defaults to `MetaMask bot`.
90-
- **`target-name`** _(optional)_. Use this if you want to ping an individual or subset of individuals on Slack using `@`.
90+
- **`subteam`** _(optional)_. Use this if you want to ping a subteam of individuals on Slack using `@`.
9191
- **`channel`** _(optional)_. Use this if you want to post to a channel other than the default: `metamask-dev`.

action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,20 @@ runs:
3535
env:
3636
YARN_NPM_AUTH_TOKEN: ${{ inputs.npm-token }}
3737
PUBLISH_NPM_TAG: ${{ inputs.npm-tag }}
38+
- id: install-pkdiff
39+
shell: bash
40+
run: npm i -g pkdiff
41+
- id: generate-report
42+
shell: bash
43+
if: inputs.npm-token == ''
44+
run: ${{ github.action_path }}/scripts/report.sh
45+
- id: upload-artifact
46+
if: inputs.npm-token == ''
47+
uses: actions/upload-artifact@v4
48+
with:
49+
path: |
50+
/tmp/*.tgz
51+
/tmp/*.html
3852
- id: name-version
3953
shell: bash
4054
if: inputs.slack-webhook-url != ''

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"url": "https://github.com/MetaMask/action-npm-publish/issues"
1616
},
1717
"homepage": "https://github.com/MetaMask/action-npm-publish#readme",
18-
"version": "4.0.3",
18+
"version": "5.0.0",
1919
"main": "index.js",
2020
"directories": {
2121
"test": "test"

0 commit comments

Comments
 (0)