mirror of
https://github.com/sprockets/sprockets.mixins.mediatype.git
synced 2024-12-28 11:24:12 +00:00
Add distribution pipeline action.
This commit is contained in:
parent
fbe6229924
commit
40b9fd422b
1 changed files with 29 additions and 0 deletions
29
.github/workflows/build.yml
vendored
Normal file
29
.github/workflows/build.yml
vendored
Normal 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
|
Loading…
Reference in a new issue