Skip to content

Commit bfb16f2

Browse files
committed
ci: add build and pypi publish
1 parent dcf258e commit bfb16f2

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Publish (PyPI)
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [master]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: [3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install build dependencies
22+
run: |
23+
pip install --upgrade build
24+
- name: Generate distribution package
25+
run: |
26+
python -m build
27+
- name: Publish package to TestPyPI
28+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
user: __token__
32+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
33+
repository_url: https://test.pypi.org/legacy/
34+
- name: Publish package to PyPI
35+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
user: __token__
39+
password: ${{ secrets.PYPI_API_TOKEN }}
40+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="dynamodump",
8-
version="0.0.6",
8+
version="0.0.8",
99
author="Benny Chew",
1010
author_email="[email protected]",
1111
description="Simple backup and restore for Amazon DynamoDB using AWS SDK for Python (boto3)",

0 commit comments

Comments
 (0)