Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: do npm publish on release event #54

Merged
merged 2 commits into from
Apr 4, 2024
Merged
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
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`
CAMOBAP marked this conversation as resolved.
Show resolved Hide resolved
- 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