Skip to content

Commit 8088574

Browse files
authored
docs: update readme highlighting USP and update meta information (#23)
1 parent 14604cd commit 8088574

3 files changed

Lines changed: 34 additions & 22 deletions

File tree

.github/actions/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "version-bump-action",
2+
"name": "pull-request-semver-bumper-core",
33
"version": "1.0.0",
44
"main": "dist/index.js",
55
"scripts": {

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,36 @@
44

55
## About this project
66

7-
This repository contains a suite of **Composite GitHub Actions** designed to automate semantic version bumping for various project types (Python, Maven, NPM, etc.) within Pull Requests.
7+
This repository provides a suite of **Composite GitHub Actions** that automate semantic version bumping directly within your Pull Requests. By handling versioning before the merge, it ensures your `main` branch is always clean, versioned, and ready for deployment.
8+
9+
## Why use this Action?
10+
11+
Most versioning tools run *after* a merge, creating a separate "release commit" that clutters your history and triggers extra CI runs. **Pull Request Semver Bumper** is different:
12+
13+
* **Bump in PR**: The version bump happens inside the Pull Request. When you merge, the version is already updated. No extra commits, no race conditions.
14+
* **Multi-Language Support**: One unified workflow for **Maven**, **NPM**, **Python**, and generic **Version Files**.
15+
* **Standardized**: Fully compliant with [Conventional Commits](https://www.conventionalcommits.org/). Your commit history becomes your changelog.
816

917
## Requirements
1018

1119
This project relies on the following software and tools:
1220

13-
* **[GitHub Actions Runner](https://github.com/actions/runner)**: Linux, macOS, or Windows runner.
14-
* **[Git](https://git-scm.com/)**: Version control system.
15-
* **[Node.js](https://nodejs.org/)**: Version 20 or higher (required for the action runtime).
21+
* **[GitHub Actions Runner](https://github.com/actions/runner)**: Linux, macOS, or Windows runner.
22+
* **[Git](https://git-scm.com/)**: Version control system.
23+
* **[Node.js](https://nodejs.org/)**: Version 20 or higher (required for the action runtime).
1624

1725
Depending on your project type, you will also need:
1826

19-
* **[Maven](https://maven.apache.org/)**: For Maven projects (requires `mvn` in the PATH).
20-
* **[NPM](https://www.npmjs.com/)**: For Node.js projects (requires `npm` in the PATH).
21-
* **[Python](https://www.python.org/) & [Poetry](https://python-poetry.org/)**: For Python projects (requires `poetry` in the PATH).
27+
* **[Maven](https://maven.apache.org/)**: For Maven projects (requires `mvn` in the PATH).
28+
* **[NPM](https://www.npmjs.com/)**: For Node.js projects (requires `npm` in the PATH).
29+
* **[Python](https://www.python.org/) & [Poetry](https://python-poetry.org/)**: For Python projects (requires `poetry` in the PATH).
2230

2331
## GitHub Marketplace Usage
2432

2533
You can use this action directly from the GitHub Marketplace. It supports multiple project types via the `type` input.
2634

2735
```yaml
28-
uses: sap/pull-request-semver-bumper@main
36+
uses: sap/pull-request-semver-bumper@v1
2937
with:
3038
type: 'npm' # Options: npm, maven, python, version-file
3139
token: ${{ secrets.GITHUB_TOKEN }}
@@ -50,26 +58,27 @@ with:
5058
| `pyproject-file` | Path to pyproject.toml (python only). | `pyproject.toml` | No |
5159
| `version-file` | Path to version file (version-file only). | `VERSION` | No |
5260

53-
54-
5561
## Contributing
5662

5763
### Forked Repositories
64+
5865
If you are contributing from a forked repository, you **must** run `npm run build` in `.github/actions/core` and commit the changes to the `dist/` folder before pushing.
5966
The CI workflow cannot automatically push changes to your fork due to GitHub security restrictions.
6067

6168
We have included a `pre-commit` hook (using `husky`) that will automatically build and add the `dist` folder when you commit changes in `.github/actions/core`.
6269
The hook is located in the project root (`.husky/`) and is automatically configured when you run `npm install` in `.github/actions/core`.
6370

6471
### Local Development
65-
1. Install dependencies: `cd .github/actions/core && npm install`
66-
* This will also set up the git hooks in the project root.
67-
2. Make changes.
68-
3. The pre-commit hook will handle the build.
72+
73+
1. Install dependencies: `cd .github/actions/core && npm install`
74+
* This will also set up the git hooks in the project root.
75+
2. Make changes.
76+
3. The pre-commit hook will handle the build.
6977

7078
## Core Concepts
7179

7280
### 1. Semantic Versioning via PR Titles
81+
7382
All actions in this suite rely on [Conventional Commits](https://www.conventionalcommits.org/) to determine the version bump level. The Pull Request title is analyzed to decide whether to perform a major, minor, or patch bump.
7483

7584
| PR Title Example | Bump Type | Result Example |
@@ -82,18 +91,20 @@ All actions in this suite rely on [Conventional Commits](https://www.conventiona
8291
> **⚠️ Important:** If the PR title does not follow the Conventional Commits specification, the action will fail, and no version bump will occur.
8392

8493
### 2. Architecture
94+
8595
These actions are **Composite Actions** that delegate the heavy lifting to a shared core action (`.github/actions/core`).
86-
- **Validation:** Checks PR title semantics.
87-
- **Version Extraction:** Reads the current version from the project file (e.g., `pom.xml`, `package.json`).
88-
- **Calculation:** Computes the next version based on the PR title.
89-
- **Execution:** Runs the ecosystem-specific bump command.
90-
- **Commit & Push:** Commits the change back to the PR branch.
96+
97+
* **Validation:** Checks PR title semantics.
98+
* **Version Extraction:** Reads the current version from the project file (e.g., `pom.xml`, `package.json`).
99+
* **Calculation:** Computes the next version based on the PR title.
100+
* **Execution:** Runs the ecosystem-specific bump command.
101+
* **Commit & Push:** Commits the change back to the PR branch.
91102

92103
## Supported Ecosystems
93104

94105
Select the action that matches your project type for specific configuration and usage instructions:
95106

96-
> **Note:** The "Action Path" listed below is for reference. We recommend using the main Gateway Action (`sap/pull-request-semver-bumper@main`) with the appropriate `type` input.
107+
> **Note:** The "Action Path" listed below is for reference. We recommend using the Gateway Action (`sap/pull-request-semver-bumper@v1`) with the appropriate `type` input.
97108

98109
| Ecosystem | Action Path | Description |
99110
| :--- | :--- | :--- |
@@ -109,6 +120,7 @@ For detailed documentation on specific ecosystem behaviors, click the links abov
109120
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/pull-request-semver-bumper/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
110121

111122
## Security / Disclosure
123+
112124
If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/SAP/pull-request-semver-bumper/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
113125

114126
## Code of Conduct

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Version Bumping Action"
1+
name: "pull-request-semver-bumper"
22
description: "Automated semantic version bumping for Maven, NPM, Python, and generic projects."
33
branding:
44
icon: "git-merge"

0 commit comments

Comments
 (0)