Skip to content

Commit

Permalink
Init publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SukiCZ committed Jan 18, 2024
1 parent aec6e66 commit b8f10ff
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
needs: [linter, tox]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools wheel twine
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Build and publish 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ tox
```bash
# Bump version (patch, minor, major)
bumpversion patch
# Build package
python setup.py sdist bdist_wheel
# Upload package to PyPI
twine upload dist/*
# Push to github
git push --tags origin master
```


Expand Down

0 comments on commit b8f10ff

Please sign in to comment.