Skip to content

Commit 4d8c586

Browse files
authored
Add action for pull requests (#228)
* Add action for pull requests * Remove .npmrc * Set GitHub package registry with setup-node action * Add build step to PR action * Enable GitHub registry in publish action * Combine publish jobs to prevent reinstalling deps * Remove unneeded prepare-release task * Bump version to v4.1.2 * Remove npm build-all step from the publish action
1 parent 7b03aa3 commit 4d8c586

File tree

6 files changed

+41
-22
lines changed

6 files changed

+41
-22
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,36 @@ on:
55
types: [created]
66

77
jobs:
8-
build:
8+
publish:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v1
1212
- uses: actions/setup-node@v1
1313
with:
1414
node-version: 12
15-
- run: npm ci
15+
registry-url: https://npm.pkg.github.com
16+
scope: '@doist'
17+
- run: npm ci --ignore-scripts
18+
env:
19+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
- run: npm run lint
21+
- run: npm run type-check
1622
- run: npm test
1723

18-
publish-npm:
19-
needs: build
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v1
24+
# Publish to GitHub package registry
2325
- uses: actions/setup-node@v1
2426
with:
2527
node-version: 12
26-
registry-url: https://registry.npmjs.org/
27-
- run: npm ci
28+
registry-url: https://npm.pkg.github.com/
2829
- run: npm publish
2930
env:
30-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
31+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3132

32-
publish-gpr:
33-
needs: build
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v1
33+
# Publish to npm registry
3734
- uses: actions/setup-node@v1
3835
with:
3936
node-version: 12
40-
registry-url: https://npm.pkg.github.com/
41-
- run: npm ci
37+
registry-url: https://registry.npmjs.org/
4238
- run: npm publish
4339
env:
44-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
40+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/pull_request.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build and test
2+
3+
on: pull_request
4+
5+
jobs:
6+
build-and-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: 12
13+
registry-url: https://npm.pkg.github.com
14+
scope: '@doist'
15+
- run: npm ci --ignore-scripts
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
- run: npm run lint
19+
- run: npm run type-check
20+
- run: npm test
21+
- run: npm run build-all

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Reactist follows [semantic versioning](https://semver.org/) and doesn't introduce breaking changes (API-wise) in minor or patch releases. However, the appearance of a component might change in a minor or patch release so keep an eye on redesigns and make sure your app still looks and feels like you expect it.
44

5+
## 4.1.2
6+
7+
- [Fix] We have a dev dependency being on the GiHub package registry and we had problems with our Github actions pulling it. This is hopefully all fixed. 🤞
8+
59
## 4.1.0
610

711
- [New] The `event` object is now forwarded to the on* handler in the `KeyCapturer` component. The `onEnter` event will also no longer fire when it's in the middle of an [IME composition session](https://developer.mozilla.org/en-US/docs/Glossary/input_method_editor).

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@doist/reactist",
33
"description": "Open source React components by Doist",
44
"author": "Henning Muszynski <henning@doist.com> (http://doist.com)",
5-
"version": "4.1.1",
5+
"version": "4.1.2",
66
"license": "MIT",
77
"homepage": "https://github.com/Doist/reactist#readme",
88
"repository": "git+https://github.com/Doist/reactist.git",
@@ -30,7 +30,6 @@
3030
"lint": "tsdx lint src stories",
3131
"prepare": "npm run build",
3232
"storybook": "start-storybook -p 6006",
33-
"prepare-release": "rm -rf node_modules package-lock && npm install && npm run lint && npm run test && npm run build-all",
3433
"prettify": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,css,scss,less,md}\""
3534
},
3635
"peerDependencies": {

0 commit comments

Comments
 (0)