-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 974 Bytes
/
pypi_job.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
name: Create a new release
run-name: ${{ github.actor }} creating a new release 🧉
# Set the access for individual scopes, or use permissions: write-all
permissions:
pull-requests: write
contents: write
packages: write
on:
push:
tags:
- "v*.*.*"
jobs:
tests:
uses: ./.github/workflows/ci_job.yml
pypi:
name: Create Pip package
permissions:
id-token: write
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install flit
run: python -m pip install flit
- name: Building 📦 with flit
run: flit build
- name: publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
verbose: true