Skip to content

Commit

Permalink
Update distribution method
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Feb 27, 2024
1 parent 0c177df commit 522fbda
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,26 +86,29 @@ jobs:
path: ./build/html

deploy:
name: Build and Release
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags/')
needs: maya

environment:
name: pypi
url: https://pypi.org/p/cmdx
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
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
twine upload dist/*
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7.x"
- name: Install build dependency
run: python3 -m pip install --upgrade build
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Release to PyPi
uses: pypa/gh-action-pypi-publish@release/v1

docs:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 522fbda

Please sign in to comment.