Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 03032e7

Browse files
authored
chore: automate npm publishing (#380)
1 parent 2c42e7c commit 03032e7

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/release-please.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ jobs:
1717
token: ${{ steps.get-token.outputs.token }}
1818
release-type: node
1919
package-name: 'netlify'
20+
- uses: actions/checkout@v2
21+
if: ${{ steps.release.outputs.release_created }}
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: '15'
25+
registry-url: 'https://registry.npmjs.org'
26+
if: ${{ steps.release.outputs.release_created }}
27+
- run: npm publish
28+
if: ${{ steps.release.outputs.release_created }}
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,7 @@ Projects that depend heavily on this client that should be taken into considerat
4242

4343
## Releasing
4444

45-
1. Merge the release PR
46-
2. Switch to the default branch `git checkout main`
47-
3. Pull latest changes `git pull`
48-
4. Publish the package `npm publish`
45+
Merge the release PR
4946

5047
## License
5148

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"./src/deploy/index.js": "./src/deploy/index.browser.js"
1616
},
1717
"scripts": {
18-
"prepublishOnly": "npm run build",
18+
"prepublishOnly": "npm ci && run-s test build",
1919
"test": "npm run format && npm run test:dev",
2020
"format": "run-s format:check-fix:*",
2121
"format:lint": "eslint --ignore-path .gitignore --fix --cache --format=codeframe --max-warnings=0 \"src/**/*.js\"",

0 commit comments

Comments
 (0)