Skip to content

Commit b9e87be

Browse files
authored
chore: automate npm publishing (#139)
1 parent 746ee38 commit b9e87be

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/release-please.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@ jobs:
99
steps:
1010
- uses: GoogleCloudPlatform/release-please-action@v2
1111
with:
12-
token: ${{ secrets.GITHUB_TOKEN }}
12+
token: ${{ secrets.NODE_PKG_RELEASE_TOKEN }}
1313
release-type: node
1414
package-name: '@netlify/eslint-config-node'
15+
- uses: actions/checkout@v2
16+
if: ${{ steps.release.outputs.release_created }}
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: '15'
20+
registry-url: 'https://registry.npmjs.org'
21+
if: ${{ steps.release.outputs.release_created }}
22+
- run: npm publish
23+
if: ${{ steps.release.outputs.release_created }}
24+
env:
25+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ After submitting the pull request, please make sure the Continuous Integration c
3939
## Releasing
4040

4141
1. Merge the release PR
42-
2. Publish the package `npm publish`

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
"test:ci": "run-s test:ci:*",
2929
"test:dev:ava": "ava",
3030
"test:ci:ava": "nyc -r lcovonly -r text -r json ava",
31-
"prepublishOnly": "run-s prepublishOnly:*",
32-
"prepublishOnly:checkout": "git checkout main",
33-
"prepublishOnly:pull": "git pull",
34-
"prepublishOnly:install": "npm ci",
35-
"prepublishOnly:test": "npm test"
31+
"prepublishOnly": "npm ci && npm test"
3632
},
3733
"config": {
3834
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{bin,.github}/**/*.{js,md,html}\" \".*.js\" \"*.md\"",

0 commit comments

Comments
 (0)