Skip to content

Commit

Permalink
tricks scm for testpypi and pep440
Browse files Browse the repository at this point in the history
  • Loading branch information
colonesej committed Jan 16, 2024
1 parent dca59d5 commit e9e327c
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,33 @@ jobs:
name: python-package-distributions
path: dist/

publish-to-test-pypi:
build-publish-to-test-pypi:
runs-on: ubuntu-latest
needs:
- build
environment:
name: testpypi
url: https://test.pypi.org/p/pyflow-wellies
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: disable scm local version
run: |
echo 'local_scheme = "no-local-version" >> pyproject.toml
git diff --color=always
git update-index --assume-unchanged pyproject.toml
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit e9e327c

Please sign in to comment.