From 40b9fd422bd2ba2c6d1d51dc32ed3047b9c025da Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Wed, 10 Nov 2021 06:50:05 -0500 Subject: [PATCH] Add distribution pipeline action. --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..69e1c32 --- /dev/null +++ b/.github/workflows/build.yml @@ -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