Skip to content

use ubuntu-latest

use ubuntu-latest #30

Workflow file for this run

name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
branches:
- 'master'
- 'test_deploy'
tags:
- '*'
concurrency:
group: deploy-${{ github.ref }}-1
# main should run through entire queue of commits for debugging
cancel-in-progress: ${{ github.ref_name != 'main'}}
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@v2
with:
python-version: 3.7
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}