Skip to content

Commit 11a70be

Browse files
Merge pull request #20 from basler/feature/Add_Release_CI
Update CI, README.md and changelog, prepare for initial automated release on PyPI.
2 parents f15caeb + 773d2ef commit 11a70be

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.github/workflows/build_and_test.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,27 @@ on:
1010
branches: [ main ]
1111
types: [ opened, synchronize, reopened ]
1212

13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
env:
17+
TWINE_USERNAME: __token__
18+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
19+
1320
jobs:
21+
setup:
22+
runs-on: ubuntu-latest
23+
outputs:
24+
is_release_build: ${{ env.RELEASE_BUILD == '1' }}
25+
steps:
26+
- name: Check for release build
27+
if: startsWith(github.ref, 'refs/tags/')
28+
run: |
29+
echo "Build release for $GITHUB_REF"
30+
echo "RELEASE_BUILD=1" >> $GITHUB_ENV
31+
1432
build:
33+
needs: setup
1534
runs-on: ubuntu-latest
1635

1736
if: |
@@ -40,7 +59,22 @@ jobs:
4059
name: pypylon-contrib-wheel
4160
path: dist/*.whl
4261

62+
- name: Upload Release Asset
63+
if: needs.setup.outputs.is_release_build == 'true'
64+
uses: softprops/action-gh-release@v1
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
with:
68+
files: dist/*
69+
70+
- name: Publish package to PyPI
71+
if: needs.setup.outputs.is_release_build == 'true' && startsWith( matrix.p, 'manylinux' )
72+
run: |
73+
sudo pip3 install twine
74+
python3 -m twine upload --non-interactive --skip-existing dist/*
75+
4376
test:
77+
needs: setup
4478
runs-on: ubuntu-latest
4579
steps:
4680
- uses: actions/checkout@v4
@@ -60,7 +94,7 @@ jobs:
6094
pytest tests
6195
6296
lint:
63-
97+
needs: setup
6498
runs-on: ubuntu-latest
6599
strategy:
66100
matrix:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![pypylon](https://github.com/basler/pypylon-samples/blob/a22ab135a34e815fdde3ef3431b868617de6f712/docs/images/Pypylon_grey_RZ_400px.png "pypylon")
1+
![pypylon](https://raw.githubusercontent.com/basler/pypylon-samples/a22ab135a34e815fdde3ef3431b868617de6f712/docs/images/Pypylon_grey_RZ_400px.png "pypylon")
22

33
Sample applications and jupyter notebooks using the official python wrapper for the Basler pylon Camera Software Suite.
44

changelog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Version 0.1.1rc1
2+
- Date 2025-09-15
3+
- Added CI and changelog, initial release on PyPI
4+
- Update README.md
5+
6+
Version 0.1.0
7+
- Date 2025-08-25
8+
- Initial release

0 commit comments

Comments
 (0)