Skip to content

Commit c5eaeb1

Browse files
committed
Setup auto publish
1 parent b6f25c3 commit c5eaeb1

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/test.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
build:
9-
9+
if: github.event_name == 'pull_request'
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
@@ -35,3 +35,27 @@ jobs:
3535
- name: Test with pytest
3636
run: |
3737
pytest -vv
38+
39+
pypi-publish:
40+
needs: build
41+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
42+
name: Upload release to PyPI
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: publish
46+
url: https://pypi.org/p/pyfiglet
47+
permissions:
48+
id-token: write
49+
steps:
50+
- uses: actions/checkout@v3
51+
- name: Set up Python ${{ matrix.python-version }}
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
cache: pip
56+
- name: Build full dist
57+
run: |
58+
python -m pip install --upgrade pip
59+
make full
60+
- name: Publish package distributions to PyPI
61+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)