Skip to content

Commit

Permalink
docs: update readme with build, test, and release instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ehrdi committed Aug 9, 2024
1 parent f11b933 commit 62a5c25
Showing 1 changed file with 46 additions and 12 deletions.
58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Welcome to the Node SDK for the PayOne PCP platform! This repository contains a powerful, easy-to-use software development kit (SDK) designed to simplify the integration of online payment processing into your applications.

### TODOS

- [ ] Setup changelog
- [ ] Setup sonarcloud
- [ ] Setup Github actions
Expand All @@ -13,8 +14,14 @@ Welcome to the Node SDK for the PayOne PCP platform! This repository contains a
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Configuration](#configuration)
- [Contributing](#contributing)
- [Build the library](#build-the-library)
- [Run tests](#run-tests)
- [Releasing the library](#releasing-the-library)
- [Preparing the Release](#preparing-the-release)
- [Changelog Generation with Conventional Changelog](#changelog-generation-with-conventional-changelog)
- [Merging the Release Branch](#merging-the-release-branch)
- [License](#license)

## Features
Expand All @@ -26,17 +33,10 @@ Welcome to the Node SDK for the PayOne PCP platform! This repository contains a

## Installation


## Usage



### Configuration





### Run the example app

```sh
Expand All @@ -57,33 +57,67 @@ Push to the branch (`git push origin feature-branch`).
Create a new Pull Request.
Please make sure to follow the coding standards and write appropriate tests for your changes.


### Build the library


```sh
npm run build
```

### Run tests

```sh
npm run test
# or for coverage
npm run coverage
```

### Releasing the library

#### Preparing the Release

- Checkout develop branch
- Create release branch (release/0.1.0)

```sh
git checkout -b release/0.1.0
```

- Run prepare-release.sh script to set correct version

```sh
./prepare-release.sh
```

#### Changelog Generation with Conventional Changelog

After calling the `prepare_release.sh` script, it is recommended to manually trigger the changelog generation script (which uses [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog)).

1. **Conventional Commit Messages**:

- Ensure all commit messages follow the conventional commit format, which helps in automatic changelog generation.
- Commit messages should be in the format: `type(scope): subject`.

2. **Enforcing Commit Messages**:

- We enforce conventional commit messages using [Lefthook](https://github.com/evilmartians/lefthook) with [commitlint](https://github.com/conventional-changelog/commitlint).
- This setup ensures that all commit messages are validated before they are committed.

3. **Generate Changelog**:
- Run the changelog generation script to update the `CHANGELOG.md` file:
```sh
npm run changelog
```
- Review and commit the updated changelog before proceeding with the release.

#### Merging the Release Branch

- Create PR on develop branch
- Merge develop in main branch


## License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

---

Thank you for using our SDK for Online Payments! If you have any questions or need further assistance, feel free to open an issue or contact us.
Thank you for using our SDK for Online Payments! If you have any questions or need further assistance, feel free to open an issue or contact us.

0 comments on commit 62a5c25

Please sign in to comment.