-
Notifications
You must be signed in to change notification settings - Fork 57.1k
47 lines (39 loc) · 1.92 KB
/
ci-detect-new-packages.yml
File metadata and controls
47 lines (39 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: 'CI: Detect New Packages on Master'
on:
pull_request:
types:
- closed
branches:
- master
jobs:
detect-new-packages:
name: Check for new unpublished packages
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: ./.github/actions/setup-nodejs
with:
build-command: ''
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
- name: Check for new unpublished packages
id: detect
continue-on-error: true
run: node .github/scripts/detect-new-packages.mjs
- name: Notify Slack about new packages
if: steps.detect.outcome == 'failure' && steps.detect.outputs.packages != ''
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.RELEASE_HELPER_SLACK_TOKEN }}
payload: |
channel: C036AELNMV0
text: |-
:warning: *New unpublished packages detected* after merging <${{ github.event.pull_request.html_url }}|PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}>
The following packages do not exist on npm yet: `${{ steps.detect.outputs.packages }}`
*If a package is not intended for npm*, set `"private": true` in its `package.json` to exclude it from future checks.
*Otherwise, to unblock the next release:*
1. Run the <${{ github.server_url }}/${{ github.repository }}/actions/workflows/release-publish-new-package.yml|Release: Publish New Package> workflow for each package
2. Configure Trusted Publishing on npmjs.com (owner: `n8n-io`, repo: `n8n`, workflow: `release-publish.yml`)