Skip to content

Commit

Permalink
Fix Twine deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmick committed Jul 23, 2024
1 parent 87e4a39 commit 4ff1216
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ name: CI pipeline
on:
push:
pull_request:
release:
types: [published]

jobs:
lint:
Expand Down Expand Up @@ -51,7 +49,7 @@ jobs:
pytest --cov-config .coveragerc --cov=emoji_data_python tests/ --cov-report term
deploy:
if: github.event_name == 'release'
if: github.ref_type == 'tag'
needs:
- test
- lint
Expand All @@ -61,16 +59,16 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel twine
pip install wheel twine setuptools
pip install .
- name: Build and publish
env:
TWINE_USERNAME: alexmick
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
sed -i "s|version=\"0.0.0\",|version=\"${GITHUB_REF/refs\/tags\//}\",|g" setup.py
python setup.py sdist bdist_wheel
Expand Down

0 comments on commit 4ff1216

Please sign in to comment.