|
23 | 23 | * [`tags` input](#tags-input) |
24 | 24 | * [`type=schedule`](#typeschedule) |
25 | 25 | * [`type=semver`](#typesemver) |
| 26 | + * [`type=pep440`](#typepep440) |
26 | 27 | * [`type=match`](#typematch) |
27 | 28 | * [`type=edge`](#typeedge) |
28 | 29 | * [`type=ref`](#typeref) |
@@ -384,11 +385,11 @@ tags: | |
384 | 385 | ``` |
385 | 386 |
|
386 | 387 | Will be used on a [push tag event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push) |
387 | | -and requires a valid Git tag [semver](https://semver.org/) but you can also use a custom value through `value` |
| 388 | +and requires a valid [semver](https://semver.org/) Git tag, but you can also use a custom value through `value` |
388 | 389 | attribute. |
389 | 390 |
|
390 | 391 | `pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/) with the following expressions: |
391 | | -* `raw` ; the actual semver |
| 392 | +* `raw` ; the actual tag |
392 | 393 | * `version` ; shorthand for `{{major}}.{{minor}}.{{patch}}` (can include pre-release) |
393 | 394 | * `major` ; major version identifier |
394 | 395 | * `minor` ; minor version identifier |
@@ -416,6 +417,51 @@ tags: | |
416 | 417 | type=semver,enable=true,priority=900,prefix=,suffix=,pattern=,value= |
417 | 418 | ``` |
418 | 419 |
|
| 420 | +### `type=pep440` |
| 421 | + |
| 422 | +```yaml |
| 423 | +tags: | |
| 424 | + # minimal |
| 425 | + type=pep440,pattern={{version}} |
| 426 | + # use custom value instead of git tag |
| 427 | + type=pep440,pattern={{version}},value=1.0.0 |
| 428 | +``` |
| 429 | + |
| 430 | +Will be used on a [push tag event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push) |
| 431 | +and requires a Git tag that conforms to [PEP 440](https://www.python.org/dev/peps/pep-0440/), but you can also use a |
| 432 | +custom value through `value` attribute. |
| 433 | + |
| 434 | +`pattern` attribute supports [Handlebars template](https://handlebarsjs.com/guide/) with the following expressions: |
| 435 | +* `raw` ; the actual tag |
| 436 | +* `version` ; cleaned version |
| 437 | +* `major` ; major version identifier |
| 438 | +* `minor` ; minor version identifier |
| 439 | +* `patch` ; patch version identifier |
| 440 | + |
| 441 | +| Git tag | Pattern | Output | |
| 442 | +|--------------------|----------------------------------------------------------|----------------------| |
| 443 | +| `1.2.3` | `{{raw}}` | `1.2.3` | |
| 444 | +| `1.2.3` | `{{version}}` | `1.2.3` | |
| 445 | +| `v1.2.3` | `{{version}}` | `1.2.3` | |
| 446 | +| `1.2.3` | `{{major}}.{{minor}}` | `1.2` | |
| 447 | +| `1.2.3` | `v{{major}}` | `v1` | |
| 448 | +| `1.2.3rc2` | `{{raw}}` | `1.2.3rc2`* | |
| 449 | +| `1.2.3rc2` | `{{version}}` | `1.2.3rc2` | |
| 450 | +| `1.2.3rc2` | `{{major}}.{{minor}}` | `1.2.3rc2`* | |
| 451 | +| `1.2.3post1` | `{{major}}.{{minor}}` | `1.2.3.post1`* | |
| 452 | +| `1.2.3beta2` | `{{major}}.{{minor}}` | `1.2.3b2`* | |
| 453 | +| `1.0dev4` | `{{major}}.{{minor}}` | `1.0.dev4`* | |
| 454 | + |
| 455 | +> *dev/pre/post release will only extend `{{version}}` as tag because they are updated frequently, |
| 456 | +> and contain many breaking changes that are (by the author's design) not yet fit for public consumption. |
| 457 | + |
| 458 | +Extended attributes and default values: |
| 459 | + |
| 460 | +```yaml |
| 461 | +tags: | |
| 462 | + type=pep440,enable=true,priority=900,prefix=,suffix=,pattern=,value= |
| 463 | +``` |
| 464 | + |
419 | 465 | ### `type=match` |
420 | 466 |
|
421 | 467 | ```yaml |
|
0 commit comments