Skip to content

Commit 0b763d8

Browse files
authored
Add files via upload
1 parent 3b7922d commit 0b763d8

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/pypi.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
push:
8+
tags:
9+
- "v*"
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
name: Build distribution
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.11"
26+
27+
- name: Install build tools
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install build twine
31+
32+
- name: Build sdist and wheel
33+
run: python -m build
34+
35+
- name: Check distribution metadata
36+
run: python -m twine check dist/*
37+
38+
- name: Upload dist artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: pypi-dist
42+
path: dist/*
43+
44+
publish:
45+
name: Publish Project_Chronos to PyPI
46+
needs: build
47+
runs-on: ubuntu-latest
48+
environment:
49+
name: pypi
50+
url: https://pypi.org/project/Project_Chronos/
51+
permissions:
52+
id-token: write
53+
contents: read
54+
55+
steps:
56+
- name: Download dist artifact
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: pypi-dist
60+
path: dist
61+
62+
- name: Publish to PyPI
63+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)