Skip to content

Commit

Permalink
Working towards prereleasing
Browse files Browse the repository at this point in the history
  • Loading branch information
hasaniqbal777 committed Nov 27, 2024
1 parent 12e706d commit c2f8c9c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 8 deletions.
7 changes: 3 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
[bumpversion]
current_version = 0.3.9
parse = ^
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # Major, minor, patch (X.Y.Z)
(?:\- # Separator
(?P<prerel>a|alpha|b|beta|d|dev|rc) # Prerelease (a, alpha, b, beta, d, dev, rc)
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) # Major, minor, patch (X.Y.Z) # Separator
((?P<prerel>a|alpha|b|beta|d|dev|rc) # Prerelease (a, alpha, b, beta, d, dev, rc)
(?P<prerelversion>\d+))? # Prerelease version
serialize =
{major}.{minor}.{patch}-{prerel}{prerelversion}
{major}.{minor}.{patch}{prerel}{prerelversion}
{major}.{minor}.{patch}

[bumpversion:part:prerel]
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Prerelease Build

on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"]
branches: ["*"]

jobs:
pypi_deploy:
name: Deploy to PyPI
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build
pip install twine
- name: Build Package
run: |
python -m build
- name: Check Package
run: |
twine check dist/* --strict
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/* --verbose
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Release Build

on:
push:
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ ignore.*.tfvars
.vscode/

# Project Specific
/logo/
/favicon/
DEVNOTES
tmp/
dev*.json
Expand All @@ -33,4 +31,7 @@ verification_error.txt
error_output.txt

# Doc Specific
**/reference/api/*
**/reference/api/*

# Assets Specific
**/assets/*/*

0 comments on commit c2f8c9c

Please sign in to comment.