Skip to content

Commit a10f5a3

Browse files
Add publish workflow (#28)
1 parent a87ef98 commit a10f5a3

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

.github/workflows/publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build the source tarball and the wheel
10+
runs-on: ubuntu-latest
11+
environment: release
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: 3.x
18+
- name: Install dependencies
19+
run: pip install hatch
20+
- name: Create packages
21+
run: hatch build
22+
- name: Archive packages
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: dist
26+
path: dist
27+
28+
publish:
29+
name: Publish build artifacts to PyPI
30+
needs: build
31+
runs-on: ubuntu-latest
32+
environment: release
33+
permissions:
34+
id-token: write
35+
steps:
36+
- name: Retrieve packages
37+
uses: actions/download-artifact@v4
38+
- name: Upload packages
39+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/main.yml renamed to .github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: test
22

33
on:
44
push:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://github.com/davidbrochart/ypywidgets/workflows/CI/badge.svg)](https://github.com/davidbrochart/ypywidgets/actions)
1+
[![Build Status](https://github.com/davidbrochart/ypywidgets/workflows/test/badge.svg)](https://github.com/davidbrochart/ypywidgets/actions)
22

33
# ypywidgets: Y-based Jupyter widgets for Python
44

0 commit comments

Comments
 (0)