publish to pypi workflow on tagged release (#549)
Browse files- .github/workflows/pypi.yml +23 -0
.github/workflows/pypi.yml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: publish pypi
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- "main"
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
pypi-publish:
|
10 |
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
11 |
+
name: Upload release to PyPI
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
environment:
|
14 |
+
name: pypi
|
15 |
+
url: https://pypi.org/p/axolotl-ai
|
16 |
+
permissions:
|
17 |
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
18 |
+
with:
|
19 |
+
verbose: true
|
20 |
+
steps:
|
21 |
+
# retrieve your distributions here
|
22 |
+
- name: Publish package distributions to PyPI
|
23 |
+
uses: pypa/gh-action-pypi-publish@release/v1
|