Skip to content

Commit

Permalink
Versionnement de beta compatible PEP440
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolite committed Sep 1, 2023
1 parent 3b8ef74 commit 1559d1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[bumpversion]
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-beta(?P<beta>\d+))?
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(b(?P<beta>\d+))?
serialize =
{major}.{minor}.{patch}-beta{beta}
{major}.{minor}.{patch}b{beta}
{major}.{minor}.{patch}
current_version = 2.0.0-toto1

[bumpversion:file:pyproject.toml]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-beta[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+b[0-9]+'

jobs:

Expand All @@ -27,7 +27,7 @@ jobs:
name: Release ${{ github.ref_name }}
generateReleaseNotes: true
draft: false
prerelease: contains(${{ github.ref_name }},'beta')
prerelease: contains(${{ github.ref_name }},'b')

build_and_test:

Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
commit_documentation:
name: Add documentation and unit tests results into gh-pages branch
needs: build_and_test
if: "!(contains(${{ github.ref_name }},'beta'))&&(needs.create_release.outputs.job_status=='success')&&(needs.build_and_test.outputs.job_status=='success')"
if: "!(contains(${{ github.ref_name }},'b'))&&(needs.create_release.outputs.job_status=='success')&&(needs.build_and_test.outputs.job_status=='success')"
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 1559d1a

Please sign in to comment.