@@ -41,36 +41,49 @@ jobs:
41
41
path : dist/
42
42
retention-days : 7
43
43
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')
47
49
runs-on : ubuntu-latest
50
+
48
51
steps :
52
+ - name : Checkout repository
53
+ uses : actions/checkout@v2
54
+
49
55
- name : Set up Python
50
56
uses : actions/setup-python@v2
51
57
with :
52
- python-version : " 3.10"
53
-
54
- - uses : actions/download-artifact@v2
58
+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
55
59
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
58
63
59
- - name : Upload to Private PyPi
64
+ - name : Build artifacts
60
65
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
64
69
env :
65
70
TWINE_USERNAME : PAT
66
71
TWINE_PASSWORD : ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
67
72
TWINE_REPOSITORY_URL : https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
73
+ run : |
74
+ python -m twine upload dist/* \
68
75
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