Skip to content

Commit

Permalink
Implements new pypi publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaquet committed Mar 13, 2024
1 parent 8721895 commit e525d9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,22 @@ name: Publish CwMath Package
on:
push:
branches:
- main
paths:
- 'src/**'
- 'setup.py'
- 'main'

jobs:
build-and-publish:
name: Build and Publish
runs-on: ubuntu-latest

runs-on: 'ubuntu-latest'
environment:
name: pypi
url: https://pypi.org/p/cwmath
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.10

- run: python -m pip install --upgrade pip
- run: pip install pip-tools
- run: pip-sync

- run: python -m build --sdist --wheel --outdir dist/ .
python-version: '3.10'
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 0 additions & 7 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@ jobs:
url: https://test.pypi.org/p/cwmath
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

# - run: python -m pip install --upgrade pip
# - run: pip install pip-tools
- run: pip install build
# - run: pip-sync

- run: python -m build

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit e525d9e

Please sign in to comment.