Skip to content

Commit 723ee95

Browse files
author
Martijn Jacobs
committed
Added workflow to release to pypi
1 parent 3fd907e commit 723ee95

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish to pypi
2+
on: workflow_dispatch
3+
4+
jobs:
5+
build:
6+
name: Build distribution
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: "3.x"
14+
- name: Install wheel
15+
run: pip install wheel
16+
- name: Build a binary wheel
17+
run: make wheel
18+
- name: Store the distribution packages
19+
uses: actions/upload-artifact@v3
20+
with:
21+
name: update-netrc-wheels
22+
path: dist/
23+
24+
publish-to-pypi:
25+
name: Publish wheel to pypi
26+
needs:
27+
- build
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/update-netrc
32+
permissions:
33+
id-token: write # IMPORTANT: mandatory for trusted publishing
34+
steps:
35+
- name: Download the wheels
36+
uses: actions/download-artifact@v3
37+
with:
38+
name: update-netrc-wheels
39+
path: dist/
40+
- name: Publish wheel to pypi
41+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)