Skip to content

Commit 42dd56d

Browse files
committed
Update CI/CD
1 parent d826357 commit 42dd56d

File tree

3 files changed

+107
-66
lines changed

3 files changed

+107
-66
lines changed

.github/workflows/publish.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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+
uses: sigstore/[email protected]
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/**

.github/workflows/wheels.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

requirements-dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--requirement=requirements.txt
2+
ruff

0 commit comments

Comments
 (0)