Skip to content

updated github workflow action to use python3 #12

updated github workflow action to use python3

updated github workflow action to use python3 #12

name: Upload Python Package git maildiff
on: push
permissions:
contents: read
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: remove old pip
run: sudo apt remove python-pip
- name: wget get-pip.py
run: wget https://bootstrap.pypa.io/get-pip.py
- name: install pip
run: python3 get-pip.py
- name: setuptools version
run: >-
python3 -c
"import setuptools; from setuptools import build_meta; print('Build meta: {}'.format(build_meta)); print(setuptools.__version__)"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}