Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Publish on Manual Release
on:
release:
types: [created]
jobs:
released:
runs-on: ubuntu-latest
if: contains(github.event.release.author.login, 'rentpath-jenkins') == false && contains(github.event.release.author.login, 'rentpath-semantic-release') == false
steps:
- name: trigger build
run: |
curl -X POST -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/dispatches -d '{"event_type":"semantic-release","client_payload":{"ref":"${{ github.ref }}","sha":"${{ github.sha }}"}}'
12 changes: 12 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Merging
on:
pull_request:
types: [closed]
jobs:
merged:
if: github.event.pull_request.merged == true
runs-on: 'ubuntu-latest'
steps:
- name: trigger build
run: |
curl -X POST -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/dispatches -d '{"event_type":"semantic-release","client_payload":{"ref":"${{ github.ref }}","sha":"${{ github.sha }}"}}'
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Package
on:
repository_dispatch:
types: [semantic-release]
jobs:
publish:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com/'
scope: '@rentpath'
- name: install dependencies
run: |
yarn config set @rentpath:registry https://npm.pkg.github.com
yarn install --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: safely run post-install scripts
run: npm rebuild && npm run prepare --if-present
- name: build
run: yarn build
- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ while useful in some cases, it is considered a bad pattern to block updates to c

we should avoid blocking updates to a component directly. you should avoid using this props when you can and focus on
creating lighter connected components that do not update so agressively instead.

## Releasing

1. Inside your pull request, bump the semantic version in `package.json`
2. Merge the pull request
3. Wait for the GitHub Actions [workflow](https://github.com/rentpath/actions) to publish your new package [here](https://github.com/rentpath/react-redux-router/packages).

Note: You can also manually [draft a release](https://github.com/rentpath/react-redux-router/releases/new) to set off the package publishing workflow.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
"react-redux": "^7.1.0",
"redux": "^4.0.1"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"engines": {
"node": ">=11.9.0"
}
Expand Down