Skip to content

Commit

Permalink
Customize RC build number
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Jan 14, 2025
1 parent 30edbd9 commit e3946d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
required: true
type: string
default: v
rc:
description: 'RC Build Number'
required: false
type: number
ga:
description: 'GA (Official) Build'
required: true
Expand Down Expand Up @@ -151,6 +155,8 @@ jobs:
uses: Gr1N/setup-poetry@v9

- name: Build
env:
rc: ${{ github.event.inputs.rc }}
run: |
git tag -l
poetry run which python
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ format-jinja = """
{%- if branch == 'main' -%}
{{ serialize_pep440(base, stage, dev=distance) }}
{%- elif branch and branch.startswith("release/") -%}
{%- if env.ga and env.ga == true -%}
{%- if env["ga"] == true -%}
{{ serialize_pep440(base)}}
{%- else -%}
{{ serialize_pep440(base, stage="rc", revision=distance) }}
{{ serialize_pep440(base, stage="rc", revision=env["rc"] ) }}
{%- endif -%}
{%- else -%}
{{ serialize_pep440(base, stage="alpha", revision=distance) }}
Expand Down

0 comments on commit e3946d0

Please sign in to comment.