Skip to content

Commit

Permalink
Documenting the release process in the README (#6)
Browse files Browse the repository at this point in the history
* Additional development steps

* Add release process to the readme
  • Loading branch information
scripthunter7 authored Feb 22, 2023
1 parent 23d0e9b commit d08d03c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Adblock Extended CSS supplement for [CSSTree](https://github.com/csstree/csstree
- [Reporting problems / Requesting features](#reporting-problems--requesting-features)
- [Development \& Contributing](#development--contributing)
- [Development commands](#development-commands)
- [Releasing a new version](#releasing-a-new-version)
- [License](#license)
- [Acknowledgements](#acknowledgements)
- [References](#references)
Expand Down Expand Up @@ -274,7 +275,8 @@ Here is a short guide on how to set up the development environment and how to su
- Create a new branch with `git checkout -b <branch-name>` (e.g. `git checkout -b feature/add-some-feature`, please add `/feature` or `/fix` prefix to your branch name)
- Make your changes in the `src` folder and make suitable tests for them in the `test` folder
- **Please do NOT differ from the original CSSTree API!** Our primary goal is to keep the API as close as possible to the original CSSTree, so that it is easy to switch between the two libraries, if needed. We only improve the "internal logic" of the library to make it able to parse Extended CSS selectors, but the API should be the same!
- Check tests by running `yarn test` (or run only a specific test with `yarn test <test-name>`)
- Check code by running `yarn lint` and `yarn test` commands (during development, you can run only a specific test with `yarn test <test-name>`)
- Build the library with `yarn build` and check the `dist` folder to make sure that the build is successful, then install the library locally with `yarn add <path-to-local-library>` and test it in your project
- If everything is OK, commit your changes and push them to your forked repository. If Husky is set up correctly, it don't allow you to commit if the linter or tests fail.
- Create a pull request to the main repository from your forked repository's branch.

Expand All @@ -290,6 +292,17 @@ During development, you can use the following commands (listed in `package.json`
- `yarn test` - run tests with [Jest](https://jestjs.io/) (you can also run a specific test with `yarn test <test-name>`)
- `yarn build` - build the library to the `dist` folder by using [Rollup](https://rollupjs.org/)

### Releasing a new version

This section describes the release process for the new versions of the ECSSTree library. This process needs to be performed by maintainers only.

1. Create a new branch for the release (e.g. `release/v1.0.0`) from the `main` branch.
2. Fill the `CHANGELOG.md` file with the changes made since the last release by following the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) rules, then commit changes as `Update changelog`.
3. Update the version number in the `package.json` file regarding the [semver](https://semver.org/) rules, then commit changes as `Bump version to v1.0.0`.
4. Create a new pull request to the `main` branch from the release branch, and merge it after the review.
5. Create a new tag with the version number (e.g. `v1.0.0`) to trigger the [release workflow](https://github.com/AdguardTeam/AGLint/blob/master/.github/workflows/release.yml).
6. The release workflow will automatically publish the new version to the [npm registry](https://www.npmjs.com/package/@adguard/ecss-tree).

## License

This library is licensed under the MIT license. See the [LICENSE](https://github.com/AdguardTeam/ecsstree/blob/main/LICENSE) file for more info.
Expand Down

0 comments on commit d08d03c

Please sign in to comment.