77 - next
88
99jobs :
10- build :
11- name : Build distribution 📦
12- runs-on : ubuntu-latest
13-
14- steps :
15- - uses : actions/checkout@v4
16- - name : Set up Python
17- uses : actions/setup-python@v4
18- with :
19- python-version : " 3.x"
20- - name : Install pypa/build
21- run : >-
22- python3 -m
23- pip install
24- build
25- --user
26- - name : Build a binary wheel and a source tarball
27- run : python3 -m build
28- - name : Store the distribution packages
29- uses : actions/upload-artifact@v3
30- with :
31- name : python-package-distributions
32- path : dist/
3310 release :
3411 runs-on : ubuntu-latest
3512 concurrency : release
4926 github_token : ${{ secrets.GH_TOKEN }}
5027 git_committer_name : jonaslagoni
5128 git_committer_email : jonas-lt@live.dk
52-
53-
54- publish-to-pypi :
55- name : >-
56- Publish Python 🐍 distribution 📦 to PyPI
57- if : steps.release.outputs.released == 'true'
58- needs :
59- - release
60- runs-on : ubuntu-latest
61- environment :
62- name : pypi
63- url : https://pypi.org/p/asyncapi_python_parser_jonaslagoni
64- permissions :
65- id-token : write # IMPORTANT: mandatory for trusted publishing
66- steps :
67- - name : Download all the dists
68- uses : actions/download-artifact@v3
69- with :
70- name : python-package-distributions
71- path : dist/
72- - name : Publish distribution 📦 to PyPI
73- uses : pypa/gh-action-pypi-publish@release/v1
74- github-release :
75- name : >-
76- Sign the Python 🐍 distribution 📦 with Sigstore
77- and upload them to GitHub Release
78- needs :
79- - publish-to-pypi
80- runs-on : ubuntu-latest
81-
82- permissions :
83- contents : write # IMPORTANT: mandatory for making GitHub Releases
84- id-token : write # IMPORTANT: mandatory for sigstore
85-
86- steps :
87- - name : Download all the dists
88- uses : actions/download-artifact@v3
89- with :
90- name : python-package-distributions
91- path : dist/
92- - name : Sign the dists with Sigstore
93- uses : sigstore/gh-action-sigstore-python@v1.2.3
94- with :
95- inputs : >-
96- ./dist/*.tar.gz
97- ./dist/*.whl
98- - name : Create GitHub Release
99- env :
100- GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
101- run : >-
102- gh release create
103- '${{ github.ref_name }}'
104- --repo '${{ github.repository }}'
105- --notes ""
106- - name : Upload artifact signatures to GitHub Release
107- env :
108- GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
109- # Upload to GitHub Release using the `gh` CLI.
110- # `dist/` contains the built packages, and the
111- # sigstore-produced signatures and certificates.
112- run : >-
113- gh release upload
114- '${{ github.ref_name }}' dist/**
115- --repo '${{ github.repository }}'
116-
117-
118- released
0 commit comments