Skip to content

Commit 672746e

Browse files
committed
Release on PyPI
1 parent 2d24fe3 commit 672746e

File tree

4 files changed

+93
-4
lines changed

4 files changed

+93
-4
lines changed

.github/workflows/octocheese.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
4+
name: "GitHub Releases"
5+
on:
6+
schedule:
7+
- cron: 0 12 * * *
8+
9+
jobs:
10+
Run:
11+
permissions:
12+
contents: write
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: domdfcoding/octocheese@master
16+
with:
17+
pypi_name: "formate-trailing-commas"
18+
env:
19+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
if: startsWith(github.ref, 'refs/tags/') != true

.github/workflows/python_ci_linux.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,51 @@ jobs:
6767
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
6868
if: steps.setup-python.outcome == 'success'
6969
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false
70+
71+
72+
73+
Deploy:
74+
needs: tests
75+
permissions:
76+
actions: write
77+
issues: write
78+
contents: read
79+
runs-on: "ubuntu-22.04"
80+
steps:
81+
- name: Checkout 🛎️
82+
uses: "actions/checkout@v4"
83+
if: startsWith(github.ref, 'refs/tags/')
84+
85+
- name: Setup Python 🐍
86+
uses: "actions/setup-python@v5"
87+
if: startsWith(github.ref, 'refs/tags/')
88+
with:
89+
python-version: 3.8
90+
91+
- name: Install dependencies 🔧
92+
if: startsWith(github.ref, 'refs/tags/')
93+
run: |
94+
python -m pip install --upgrade pip setuptools wheel
95+
python -m pip install --upgrade tox~=3.0
96+
97+
- name: Build distributions 📦
98+
if: startsWith(github.ref, 'refs/tags/')
99+
run: |
100+
tox -e build
101+
102+
103+
- name: Upload distribution to PyPI 🚀
104+
if: startsWith(github.ref, 'refs/tags/')
105+
uses: pypa/[email protected]
106+
with:
107+
user: __token__
108+
password: ${{ secrets.PYPI_TOKEN }}
109+
skip-existing: true
110+
111+
- name: Close milestone 🚪
112+
if: startsWith(github.ref, 'refs/tags/')
113+
run: |
114+
python -m pip install --upgrade github3.py packaging
115+
python .github/milestones.py
116+
env:
117+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.rst

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ formate-trailing-commas
1717

1818
* - Tests
1919
- |actions_linux| |actions_windows| |actions_macos|
20+
* - PyPI
21+
- |pypi-version| |supported-versions| |supported-implementations| |wheel|
2022
* - Activity
21-
- |commits-latest| |commits-since| |maintained|
23+
- |commits-latest| |commits-since| |maintained| |pypi-downloads|
2224
* - QA
2325
- |codefactor| |actions_flake8| |actions_mypy|
2426
* - Other
@@ -52,6 +54,22 @@ formate-trailing-commas
5254
:target: https://www.codefactor.io/repository/github/python-formate/formate-trailing-commas
5355
:alt: CodeFactor Grade
5456

57+
.. |pypi-version| image:: https://img.shields.io/pypi/v/formate-trailing-commas
58+
:target: https://pypi.org/project/formate-trailing-commas/
59+
:alt: PyPI - Package Version
60+
61+
.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/formate-trailing-commas?logo=python&logoColor=white
62+
:target: https://pypi.org/project/formate-trailing-commas/
63+
:alt: PyPI - Supported Python Versions
64+
65+
.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/formate-trailing-commas
66+
:target: https://pypi.org/project/formate-trailing-commas/
67+
:alt: PyPI - Supported Implementations
68+
69+
.. |wheel| image:: https://img.shields.io/pypi/wheel/formate-trailing-commas
70+
:target: https://pypi.org/project/formate-trailing-commas/
71+
:alt: PyPI - Wheel
72+
5573
.. |license| image:: https://img.shields.io/github/license/python-formate/formate-trailing-commas
5674
:target: https://github.com/python-formate/formate-trailing-commas/blob/master/LICENSE
5775
:alt: License
@@ -70,19 +88,23 @@ formate-trailing-commas
7088
.. |maintained| image:: https://img.shields.io/maintenance/yes/2026
7189
:alt: Maintenance
7290

91+
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/formate-trailing-commas
92+
:target: https://pypi.org/project/formate-trailing-commas/
93+
:alt: PyPI - Downloads
94+
7395
.. end shields
7496
7597
Installation
7698
--------------
7799

78100
.. start installation
79101
80-
``formate-trailing-commas`` can be installed from GitHub.
102+
``formate-trailing-commas`` can be installed from PyPI.
81103

82104
To install with ``pip``:
83105

84106
.. code-block:: bash
85107
86-
$ python -m pip install git+https://github.com/python-formate/formate-trailing-commas
108+
$ python -m pip install formate-trailing-commas
87109
88110
.. end installation

repo_helper.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ enable_tests: false
1515
enable_docs: false
1616
min_coverage: 97
1717
use_whey: true
18-
on_pypi: false
1918

2019
python_versions:
2120
- '3.7'

0 commit comments

Comments
 (0)