Skip to content

Commit 3fa0524

Browse files
authored
build: setup CI/CD for package publishing (#14)
* Creates GitHub workflow to publish the package to npm on push to `master` * Renames package from `eslint-plugin-pipedream` to `@pipedream/eslint-plugin-pipedream` to publish in org scope * Update `actions/checkout` and `actions/setup-node` to v4 in PR check WF to fix: `getCacheEntry failed: Cache service responded with 503`
1 parent f225ffa commit 3fa0524

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Package to npm
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '14.x'
17+
registry-url: 'https://registry.npmjs.org'
18+
cache: 'npm'
19+
- run: npm ci
20+
- run: npm test
21+
- name: npm publish
22+
run: npm publish --access public
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/pull-request-checks.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: Use Node.js 14.x
16-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v4
1717
with:
1818
node-version: 14.x
1919
cache: 'npm'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ We will gladly accept issues and PRs in this repo.
1515
In the repo where you manage Pipedream components, run:
1616

1717
```bash
18-
npm install eslint-plugin-pipedream --save-dev
18+
npm install @pipedream/eslint-plugin-pipedream --save-dev
1919
```
2020

2121
Then add the Pipedream plugin to the `plugins` section of your [ESLint config file](https://eslint.org/docs/user-guide/configuring/):

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "eslint-plugin-pipedream",
2+
"name": "@pipedream/eslint-plugin-pipedream",
33
"version": "0.2.4",
44
"description": "ESLint plugin for Pipedream components: https://pipedream.com/docs/components/api/",
55
"main": "index.js",

0 commit comments

Comments
 (0)