Skip to content

Commit 93995cf

Browse files
committed
Add workflow to publish package to PyPi
1 parent 296ad1c commit 93995cf

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
python-version: [3.8, 3.9]
1717

1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v3
2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v1
21+
uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install dependencies

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPi
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
workflow_dispatch:
7+
jobs:
8+
build-and-publish:
9+
name: Build and publish Kanboard's Python package
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.x'
16+
- name: Install pypa/build
17+
run: >-
18+
python -m
19+
pip install
20+
build
21+
--user
22+
- name: Build a binary wheel and a source tarball
23+
run: >-
24+
python -m
25+
build
26+
--sdist
27+
--wheel
28+
--outdir dist/
29+
.
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)