File tree Expand file tree Collapse file tree 2 files changed +48
-56
lines changed Expand file tree Collapse file tree 2 files changed +48
-56
lines changed Original file line number Diff line number Diff line change 83
83
uses : codecov/codecov-action@v3
84
84
with :
85
85
directory : reports/
86
+
87
+
88
+ publish :
89
+ name : Publish package to PyPI
90
+ runs-on : ubuntu-latest
91
+ needs :
92
+ - tests
93
+ - e2e_tests
94
+
95
+ if : github.repository == 'django-commons/django-cookie-consent' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
96
+
97
+ environment :
98
+ name : release
99
+ url : https://pypi.org/project/django-cookie-consent/
100
+ permissions :
101
+ id-token : write
102
+
103
+ steps :
104
+ - uses : actions/checkout@v4
105
+ - uses : actions/setup-python@v5
106
+ with :
107
+ python-version : ' 3.12'
108
+ - uses : actions/setup-node@v4
109
+ with :
110
+ node-version-file : ' js/.nvmrc'
111
+ cache : npm
112
+ registry-url : ' https://registry.npmjs.org'
113
+
114
+ # Required to ensure the build artifacts are in the packages.
115
+ - uses : ./.github/actions/build-js
116
+ with :
117
+ npm-package : ' true'
118
+ django-staticfiles : ' true'
119
+
120
+ - name : Build sdist and wheel
121
+ run : |
122
+ pip install build --upgrade
123
+ python -m build
124
+
125
+ # TODO: enable verified publishing!
126
+ - name : Publish a Python distribution to PyPI
127
+ uses : pypa/gh-action-pypi-publish@release/v1
128
+
129
+ - name : Publish NPM package to Github
130
+ run : npm publish
131
+ working-directory : js
132
+ env :
133
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments