fix: bootstrap apps without version config
This commit is contained in:
1 parent
0848079db3
commit
59e040994b
5 files changed
+63
-9
No files matched your search
@@ -58,9 +58,11 @@ jobs:
|
||||
|
||||
- name: Prepare version
|
||||
id: version
|
||||
uses: Nurinda/bump-erp-app-version@v1
|
||||
# The absolute URL is required when Gitea's DEFAULT_ACTIONS_URL is "github".
|
||||
uses: https://gitea.cptckp.com/Nurinda/bump-erp-app-version@v1
|
||||
with:
|
||||
config-file: pyproject.toml
|
||||
version-file: erp_operations/__init__.py
|
||||
base-branch: main
|
||||
target-branch: develop
|
||||
bump: patch
|
||||
@@ -78,6 +80,7 @@ Gitea may suppress workflows caused by pushes authenticated with its built-in `G
|
||||
| Input | Default | Description |
|
||||
|---|---|---|
|
||||
| `config-file` | `pyproject.toml` | `bump-my-version` TOML configuration |
|
||||
| `version-file` | empty | App `__init__.py` used to bootstrap a base branch that predates the configuration |
|
||||
| `base-branch` | `main` | Branch providing the baseline version |
|
||||
| `target-branch` | `develop` | Checked-out branch receiving the commit |
|
||||
| `bump` | `patch` | `major`, `minor`, or `patch` |
|
||||
@@ -101,6 +104,8 @@ Gitea may suppress workflows caused by pushes authenticated with its built-in `G
|
||||
|
||||
The action does not force-push, create tags, publish releases, or call forge APIs. Concurrent release jobs are resolved safely by the remote rejecting a non-fast-forward push. Configure workflow-level concurrency if release PRs can overlap.
|
||||
|
||||
For the first versioned release, the base branch might not contain `[tool.bumpversion]` yet. Set `version-file` to the app's `__init__.py`; the action will read its base-branch `__version__` as the bootstrap baseline. Once the configuration reaches the base branch, it becomes the authoritative baseline.
|
||||
|
||||
## Releasing the action
|
||||
|
||||
Create and push an immutable semantic-version tag:
|
||||
|
||||
Reference in new issue
Block a user