mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-12-25 03:00:22 +00:00
Add build.yml
Roughly based on what @gmr did in sprockets-postgres... still not sure if the explicit `if` guard is necessary.
This commit is contained in:
parent
f51870b2f9
commit
ea8d2363fe
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' && startsWith(github.ref, 'refs/tags') && github.repository == 'sprockets/sprockets-statsd'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7 # use 3.7 for wheel compatibility
|
||||
- name: Install builder
|
||||
run: |
|
||||
python -m pip install --upgrade build pip setuptools twine
|
||||
- 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 # just in case...
|
Loading…
Reference in a new issue