diff options
author | Julian Berman <Julian@GrayVines.com> | 2019-12-21 16:20:56 +0100 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2019-12-21 16:20:56 +0100 |
commit | ab3bf4ab76411e4e59cccdafd88f6ec4bf4e5865 (patch) | |
tree | b8de73ce07a0330931db9e6c7ef51361279a5b04 /.github | |
parent | fe76b21e9d924863bca61a7035287f69c87e092c (diff) | |
download | jsonschema-ab3bf4ab76411e4e59cccdafd88f6ec4bf4e5865.tar.gz |
Add a packaging GHA.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/packaging.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 0000000..bdc1b0a --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,38 @@ +name: Packaging + +on: + push: + release: + types: [published] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest] + python-version: [pypy2, pypy3, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: python -m pip install pep517 + - name: Evade 'pypa/pep517#74' + run: python -m pip install -U setuptools setuptools-scm pip wheel + if: startsWith(matrix.python-version, 'pypy') + - name: Create packages + run: python -m pep517.build . + - uses: actions/upload-artifact@master + with: + name: dist-${{ matrix.os }}-${{ matrix.python-version }} + path: dist + - name: Publish package + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && matrix.python-version == 'pypy3' && startsWith(matrix.os, 'ubuntu') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} |