-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 913 Bytes
/
Copy pathpublish.yml
File metadata and controls
46 lines (36 loc) · 913 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Publish
on:
push:
tags:
- "v*"
workflow_call:
inputs:
tag:
description: "Tag to build and publish"
required: true
type: string
permissions:
contents: read
id-token: write
jobs:
build:
environment: pypi
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }} # using input tags or github ref if tags are manually pushed
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Create virtual environment
run: uv venv .venv
- name: Build package
run: uv build
- name: Publish package
run: uv publish