File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change
1
+ # #
2
+ # Derived from:
3
+ # https://github.com/django-commons/django-commons-playground/blob/main/.github/workflows/release.yml
4
+ #
5
+
1
6
name : Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
7
3
8
on : push
4
9
5
10
env :
6
- # Change these for your project's URLs
7
11
PYPI_URL : https://pypi.org/p/django-typer
8
- # Eventually add back the test release, see example at
9
- # https://github.com/django-commons/django-commons-playground/blob/main/.github/workflows/release.yml
12
+ PYPI_TEST_URL : https://test.pypi.org/project/django-typer
10
13
11
14
jobs :
12
15
94
97
gh release upload
95
98
'${{ github.ref_name }}' dist/**
96
99
--repo '${{ github.repository }}'
100
+
101
+ publish-to-testpypi :
102
+ name : Publish Python 🐍 distribution 📦 to TestPyPI
103
+ needs :
104
+ - build
105
+ runs-on : ubuntu-latest
106
+
107
+ environment :
108
+ name : testpypi
109
+ url : ${{ env.PYPI_TEST_URL }}
110
+
111
+ permissions :
112
+ id-token : write # IMPORTANT: mandatory for trusted publishing
113
+
114
+ steps :
115
+ - name : Download all the dists
116
+ uses : actions/download-artifact@v3
117
+ with :
118
+ name : python-package-distributions
119
+ path : dist/
120
+ - name : Publish distribution 📦 to TestPyPI
121
+ uses : pypa/gh-action-pypi-publish@release/v1.10
122
+ with :
123
+ repository-url : https://test.pypi.org/legacy/
124
+ skip-existing : true
You can’t perform that action at this time.
0 commit comments