Skip to content

Commit b3dceb4

Browse files
committed
added release workflow.
1 parent a770304 commit b3dceb4

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
name: Build distribution
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.8"
19+
20+
- name: Install build dependencies
21+
run: python -m pip install --upgrade pip setuptools wheel
22+
23+
- name: Build package
24+
run: python setup.py sdist bdist_wheel
25+
26+
- name: Upload distribution artifacts
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-package-distributions
30+
path: dist/
31+
32+
publish:
33+
name: Publish to PyPI
34+
needs: build
35+
runs-on: ubuntu-latest
36+
environment:
37+
name: release
38+
url: https://pypi.org/p/moesifwsgi
39+
permissions:
40+
id-token: write
41+
steps:
42+
- name: Download distribution artifacts
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
48+
- name: Publish to PyPI
49+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)