mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 23:49:07 +00:00
Add a github action to automate releases to PyPI (thanks @hanifbirgani)
This commit is contained in:
commit
8dfaa95afa
2 changed files with 54 additions and 0 deletions
46
.github/workflows/publish-to-pypi.yml
vendored
Normal file
46
.github/workflows/publish-to-pypi.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: Publish to PyPI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
|
||||||
|
- name: Install pypa/build
|
||||||
|
run: >-
|
||||||
|
python -m
|
||||||
|
pip install
|
||||||
|
build
|
||||||
|
--user
|
||||||
|
|
||||||
|
- name: Build a binary wheel and a source tarball
|
||||||
|
run: >-
|
||||||
|
python -m
|
||||||
|
build
|
||||||
|
--sdist
|
||||||
|
--wheel
|
||||||
|
--outdir dist/
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Publish distribution to PyPI
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
user: __token__
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@ -116,6 +116,14 @@ TEMPLATES = [
|
||||||
<sub><b>Dan Jacob</b></sub>
|
<sub><b>Dan Jacob</b></sub>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
<td align="center">
|
||||||
|
<a href="https://github.com/hanifbirgani">
|
||||||
|
<img src="https://avatars.githubusercontent.com/u/53351186?v=4" width="100;" alt="hanifbirgani"/>
|
||||||
|
<br />
|
||||||
|
<sub><b>Hanif Birgani</b></sub>
|
||||||
|
</a>
|
||||||
|
</td></tr>
|
||||||
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a href="https://github.com/telenieko">
|
<a href="https://github.com/telenieko">
|
||||||
<img src="https://avatars.githubusercontent.com/u/10505?v=4" width="100;" alt="telenieko"/>
|
<img src="https://avatars.githubusercontent.com/u/10505?v=4" width="100;" alt="telenieko"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue