Skip to content

Commit

Permalink
Fix release pipeline (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jan 5, 2023
1 parent 2572f1c commit d5fc949
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,37 @@ jobs:
pypi:
name: Publish to PyPI registry
environment: release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
FORCE_COLOR: 1
PY_COLORS: 1
TOXENV: packaging
TOX_PARALLEL_NO_SPINNER: 1

steps:
- name: Switch to using Python 3.8 by default
- name: Switch to using Python 3.9 by default
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install tox
run: >-
python3 -m
pip install
--user
tox
- name: Check out src from Git
uses: actions/checkout@v3
with:
fetch-depth: 0 # needed by setuptools-scm

- name: Build dists
run: python -m tox
- name: Publish to test.pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
run: python -m tox -e pkg

- name: Publish to pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}

0 comments on commit d5fc949

Please sign in to comment.