-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 812 Bytes
/
Copy pathrelease.yml
File metadata and controls
28 lines (25 loc) · 812 Bytes
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
name: Publish to PyPI
# Publishes when you push a version tag like v0.2.0.
# Uses PyPI Trusted Publishing (OIDC) — no API token stored in the repo.
# One-time setup: on pypi.org add a "pending publisher" for project `riskkit`,
# owner `HasibVortex369`, repo `riskkit`, workflow `release.yml`, environment `pypi`.
on:
push:
tags: ["v*"]
jobs:
build-and-publish:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # required for trusted publishing
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build
run: |
python -m pip install --upgrade build
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1