Skip to content

Commit 89b94dc

Browse files
author
Charles Larivier
committed
feat: add publish Github Actions
Signed-off-by: Charles Larivier <charles@dribbble.com>
1 parent e0e9653 commit 89b94dc

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: build
4+
name: ci
55

66
on:
77
push:
@@ -13,8 +13,7 @@ on:
1313
- develop
1414

1515
jobs:
16-
build:
17-
16+
test:
1817
runs-on: ubuntu-latest
1918
strategy:
2019
fail-fast: false

.github/workflows/publish.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Install pypa/build
20+
run: >-
21+
python -m
22+
pip install
23+
build
24+
--user
25+
26+
- name: Build a binary wheel and a source tarball
27+
run: >-
28+
python -m
29+
build
30+
--sdist
31+
--wheel
32+
--outdir dist/
33+
.
34+
35+
- name: Publish distribution to Test PyPI
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
39+
repository_url: https://test.pypi.org/legacy/
40+
41+
- name: Publish distribution to PyPI
42+
if: startsWith(github.ref, 'refs/tags')
43+
uses: pypa/gh-action-pypi-publish@master
44+
with:
45+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)