Skip to content

Commit 62e6af4

Browse files
committed
2 parents 827e050 + 0677f1c commit 62e6af4

File tree

2 files changed

+89
-17
lines changed

2 files changed

+89
-17
lines changed

.github/workflows/builder.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Publish Python Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: '3.10'
18+
19+
- name: Install build tools
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build twine
23+
24+
- name: Build the package
25+
run: python -m build
26+
27+
- name: Publish to PyPI
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
31+
run: |
32+
twine upload dist/*
33+
34+
- name: Upload build artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: libcrypto-distribution
38+
path: dist/
Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,69 @@
1-
name: PyPI Builder
1+
name: .::Build and Publish Libcrypto Package::.
2+
23
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_bump:
7+
description: 'Version bump type (patch, minor, major) or skip for no bump'
8+
required: false
9+
default: 'skip'
10+
type: choice
11+
options:
12+
- skip
13+
- patch
14+
- minor
15+
- major
16+
custom_version:
17+
description: 'Custom version (e.g., 1.2.3) - overrides version_bump'
18+
required: false
19+
type: string
20+
version_suffix:
21+
description: 'Version suffix (e.g., rc1, a1, b1) - optional'
22+
required: false
23+
type: string
24+
dry_run:
25+
description: 'Dry run (build only, do not publish)'
26+
required: false
27+
default: false
28+
type: boolean
29+
330
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
31+
tags:
32+
- 'v*'
33+
34+
release:
35+
types: [published]
36+
937
jobs:
1038
build:
1139
runs-on: ubuntu-latest
40+
1241
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
42+
- name: Checkout Repository
43+
uses: actions/checkout@v4
1544

1645
- name: Set up Python
17-
uses: actions/setup-python@v2
46+
uses: actions/setup-python@v5
1847
with:
19-
python-version: '3.8'
48+
python-version: '3.10'
2049

21-
- name: Install dependencies
50+
- name: Install build tools
2251
run: |
2352
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
53+
pip install build twine
2554
26-
- name: Build package
27-
run: |
28-
python setup.py sdist bdist_wheel
55+
- name: Build the package
56+
run: python -m build
2957

30-
- name: Upload to PyPI
58+
- name: Publish to PyPI
3159
env:
3260
TWINE_USERNAME: __token__
3361
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
3462
run: |
35-
twine upload dist/*
63+
twine upload dist/*
64+
65+
- name: Upload build artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: libcrypto-distribution
69+
path: dist/

0 commit comments

Comments
 (0)