Skip to content

Commit

Permalink
Update python-publishtest.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisPenningsCM committed Jun 12, 2024
1 parent 7c0ae74 commit 3dc0e6b
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/python-publishtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,18 @@ on:
- '!**'
- 'cm_text/version.py'

jobs:
deploy:
runs-on: windows-latest
jobs:
testpypi-publish:
name: Upload release to test PyPI
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/cm-text-sdk-python
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --user --upgrade setuptools wheel
python setup.py sdist bdist_wheel
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m pip install --user --upgrade twine
python -m twine upload --repository testpypi --skip-existing dist/*
- uses: actions/checkout@v2
- id: build
uses: OpenAstronomy/build-python-dist@v1
- name: Publish package distributions to testPyPI
uses: pypa/[email protected]

0 comments on commit 3dc0e6b

Please sign in to comment.