Skip to content

Commit 87db8da

Browse files
committed
Updated ci.yml
1 parent 2a4ffa8 commit 87db8da

File tree

1 file changed

+33
-20
lines changed

1 file changed

+33
-20
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,36 +41,49 @@ jobs:
4141
path: dist/
4242
retention-days: 7
4343

44-
Release:
45-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
46-
needs: [build]
44+
release:
45+
name: Release
46+
if: |
47+
github.event_name == 'push' &&
48+
contains(github.ref, 'refs/tags')
4749
runs-on: ubuntu-latest
50+
4851
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v2
54+
4955
- name: Set up Python
5056
uses: actions/setup-python@v2
5157
with:
52-
python-version: "3.10"
53-
54-
- uses: actions/download-artifact@v2
58+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5559

56-
- name: Display structure of downloaded files
57-
run: ls -R
60+
- name: Install dependencies
61+
run: |
62+
python -m pip install --upgrade pip build wine
5863
59-
- name: Upload to Private PyPi
64+
- name: Build artifacts
6065
run: |
61-
pip install twine
62-
twine upload --skip-existing ./**/*.whl
63-
twine upload --skip-existing ./**/*.tar.gz
66+
python -m build && python -m twine check dist/*
67+
68+
- name: Publish to private PyPI
6469
env:
6570
TWINE_USERNAME: PAT
6671
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
6772
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
73+
run: |
74+
python -m twine upload dist/* \
6875
69-
- name: Release
70-
uses: softprops/action-gh-release@v1
71-
with:
72-
generate_release_notes: true
73-
files: |
74-
./**/*.whl
75-
./**/*.tar.gz
76-
./**/*.pdf
76+
# - name: Publish to PyPI
77+
# env:
78+
# TWINE_USERNAME: __token__
79+
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
80+
# run: |
81+
# python -m twine upload --skip-existing ./**/*.whl
82+
# python -m twine upload --skip-existing ./**/*.tar.gz
83+
84+
# - name: Publish to GitHub
85+
# uses: softprops/action-gh-release@v1
86+
# with:
87+
# files: |
88+
# ./**/*.whl
89+
# ./**/*.tar.gz

0 commit comments

Comments
 (0)