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