-
Notifications
You must be signed in to change notification settings - Fork 45
45 lines (37 loc) · 1.2 KB
/
release.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: Build, Test, and Publish to PyPI
on:
push:
tags:
- 'v*.*.*' # Matches version tags like v1.0.0, v2.1.3, etc.
jobs:
pypi-publish:
name: Upload release to PyPI
if: github.repository == 'petrobras/bibmon'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
environment:
name: pypi
url: https://pypi.org/p/bibmon
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: read # Required for actions/checkout
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and generate package
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true