1+ name : Publish 📡 Python 🐍 distributions 📦
2+
3+ on :
4+ push :
5+ tags :
6+ - v*
7+
8+ jobs :
9+ lint :
10+ name : Lint 🧹 and Check 🧐 Python 🐍 package 🗂️
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Setup 🛠️ Python 🐍
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : " 3.x"
20+
21+ - name : Install 🛠️ dependencies 📚
22+ run : |
23+ pip install --upgrade pip
24+ pip install --requirement=requirements-dev.txt
25+
26+ - name : Lint 🧹 with Ruff ⚡️
27+ run : ruff check --output-format=github .
28+
29+ build :
30+ name : Build 🏗️ distributions 📦
31+ needs : [lint]
32+ runs-on : ubuntu-latest
33+
34+ steps :
35+ - uses : actions/checkout@v4
36+
37+ - name : Setup 🛠️ Python 🐍
38+ uses : actions/setup-python@v5
39+ with :
40+ python-version : " 3.x"
41+
42+ - name : Build 🏗️ a source distribution 🗃️ and a binary wheel 🛞
43+ run : pipx run build --outdir=distributions
44+
45+ - name : Upload 📤 the built distributions 📦
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : distributions
49+ path : distributions/
50+
51+ publish-to-pypi :
52+ name : Publish 📡 Python 🐍 distributions 📦 to PyPI 🌐
53+ needs : [build]
54+ runs-on : ubuntu-latest
55+ environment :
56+ name : release
57+ url : https://pypi.org/p/joblib-progress
58+ permissions :
59+ id-token : write
60+
61+ steps :
62+ - name : Download 📥 all the distributions 📦
63+ uses : actions/download-artifact@v4
64+ with :
65+ pattern : distributions
66+ path : distributions/
67+ merge-multiple : true
68+
69+ - name : Publish 📡 distributions 📦 to PyPI 🌐
70+ uses : pypa/gh-action-pypi-publish@release/v1
71+ with :
72+ packages-dir : distributions/
73+
74+ upload-to-github-release :
75+ name : Upload 📤 Python 🐍 distributions 📦 to GitHub Release 🚀
76+ needs : [publish-to-pypi]
77+ runs-on : ubuntu-latest
78+ permissions :
79+ id-token : write
80+ contents : write
81+
82+ steps :
83+ - name : Download 📥 all the distributions 📦
84+ uses : actions/download-artifact@v4
85+ with :
86+ pattern : distributions
87+ path : distributions/
88+ merge-multiple : true
89+
90+ - name : Sign 🔑 the distributions 📦 with Sigstore
91+ 92+ with :
93+ inputs : |
94+ distributions/*.tar.gz
95+ distributions/*.whl
96+
97+ - name : Create 📂 GitHub Release 🚀
98+ env :
99+ GITHUB_TOKEN : ${{ github.token }}
100+ run : gh release --repo="${{ github.repository }}" create "${{ github.ref_name }}"
101+
102+ - name : Upload 📤 distributions 📦 and signatures 🔏 to GitHub Release 🚀
103+ env :
104+ GITHUB_TOKEN : ${{ github.token }}
105+ run : gh release --repo="${{ github.repository }}" upload "${{ github.ref_name }}" distributions/**
0 commit comments