Add distribution pipeline action.

This commit is contained in:
Dave Shawley 2021-11-10 06:50:05 -05:00
parent fbe6229924
commit 40b9fd422b
No known key found for this signature in database
GPG key ID: F41A8A99298F8EED

29
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Distribution
on:
push:
branches-ignore: ["*"]
tags: ["*"]
jobs:
upload-package:
name: "Build & upload package"
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'sprockets/sprockets.mixins.media_type' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install build tools
run: |
python -m pip install --upgrade build pip setuptools twine wheel
- name: Build distributions
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Upload packages
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
skip_existing: true