Skip to content

Commit

Permalink
chore: do npm publish on release event (#54)
Browse files Browse the repository at this point in the history
* chore: do npm publish on release event

* docs: apply review feedback

Co-authored-by: e271828- <[email protected]>

---------

Co-authored-by: e271828- <[email protected]>
  • Loading branch information
CAMOBAP and e271828- authored Apr 4, 2024
1 parent 3e66749 commit 343c60c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
branches: [ master ]
tags: [ '*' ]
release:
pull_request:
workflow_dispatch:
schedule:
Expand Down Expand Up @@ -121,11 +121,11 @@ jobs:
update_existing: true
filename: .github/examples-issue-template.md
release:
if: startsWith(github.ref, 'refs/tags') && endsWith(github.event.base_ref, 'master')
if: github.event_name == 'release'
needs: [test-npm, test-yarn]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: npm release
env:
Expand Down
13 changes: 9 additions & 4 deletions MAINTAINER.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
### Release steps

**Note:** we use [SemVer format](https://semver.org/).
1. Pick the right version number:

**Note:** we use [SemVer format](https://semver.org/):

MAJOR: breaking change.
MINOR: new feature(s), backwards compatible.
PATCH: bugfix only.

Prepare a PR:
2. Prepare a PR:

- bump [`package.json's`](./package.json) version
- run `npm i` to update `package-lock.json`
- commit `package.json` and `package-lock.json`

After merging PR and tests pass CI will do `npm publish`:
- open the PR for review
- once the PR is approved and merged to master:
- set the tag on master matching your version: git tag `vM.M.P`
- draft a new release https://github.com/hCaptcha/react-native-hcaptcha/releases
- once the release is created, CI will release the new version to https://www.npmjs.com/package/@hcaptcha/react-native-hcaptcha?activeTab=versions

### Generate test app

Expand Down

0 comments on commit 343c60c

Please sign in to comment.