-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added automatic update of pip package
- Loading branch information
Tobias Olsen
committed
Mar 25, 2022
1 parent
91429a4
commit ea92755
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Publish Python 🐍 distributions 📦 to PyPI | ||
|
||
|
||
# Run on every commit tag which begins with "v" (e.g., "v0.1.4") | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
# Setup Python (faster than using Python container) | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install pipenv | ||
run: | | ||
python -m pip install --upgrade pipenv wheel | ||
- id: cache-pipenv | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.local/share/virtualenvs | ||
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-pipenv.outputs.cache-hit != 'true' | ||
run: | | ||
pipenv install --deploy --dev | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
pipenv run build | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |