Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit b4ccb71

Browse files
authored
Merge pull request #2 from daita-technologies/develop
Refactoring GH Actions
2 parents b301505 + 4902ffb commit b4ccb71

3 files changed

Lines changed: 51 additions & 9 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Python 🐍 library πŸ“¦ to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-n-publish:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os:
13+
- ubuntu-latest
14+
architecture:
15+
- 'x64'
16+
python-version:
17+
- '3.8'
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
architecture: ${{ matrix.architecture }}
28+
29+
- name: Install pypa/build
30+
run: >-
31+
python -m
32+
pip install
33+
build
34+
--user
35+
36+
- name: Build a binary wheel and a source tarball
37+
run: >-
38+
python -m
39+
build
40+
--sdist
41+
--wheel
42+
--outdir dist/
43+
.
44+
45+
- name: Publish library πŸ“¦ to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1
47+
with:
48+
user: __token__
49+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python 🐍 library πŸ“¦ to TestPyPI and PyPI
1+
name: Publish Python 🐍 library πŸ“¦ to TestPyPI
22

33
on:
44
push:
@@ -49,10 +49,3 @@ jobs:
4949
user: __token__
5050
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
5151
repository_url: https://test.pypi.org/legacy/
52-
53-
- name: Publish library πŸ“¦ to PyPI
54-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
55-
uses: pypa/gh-action-pypi-publish@release/v1
56-
with:
57-
user: __token__
58-
password: ${{ secrets.PYPI_API_TOKEN }}

β€Ždaita/__init__.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.4"
1+
__version__ = "0.0.5"

0 commit comments

Comments
Β (0)