-
Notifications
You must be signed in to change notification settings - Fork 101
45 lines (38 loc) · 1007 Bytes
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: Upload Python Package
# yamllint disable-line rule:truthy
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes python3-setuptools python3-wheel
- name: Build
run: |
python3 setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v4
with:
path: ./dist
name: dist
pypi-publish:
needs: ['build']
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/prometheus-pve-exporter/
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: ./dist
name: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1