forked from stg-annon/stashapi
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 980 Bytes
/
publish.yaml
File metadata and controls
42 lines (35 loc) · 980 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
name: Build and publish to PyPI
on:
# Triggers the workflow when a release is created
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
target_branch:
description: 'Branch to build and publish'
required: true
default: 'main'
jobs:
upload:
runs-on: ubuntu-latest
steps:
# Checks-out repository under $GITHUB_WORKSPACE
- name: "Checkout repository and submodules"
uses: actions/checkout@v4
with:
ref: ${{inputs.target_branch}}
fetch-tags: true
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.1"
pyproject-file: pyproject.toml
- name: Install the project
run: uv sync
- name: Build
run: uv build
- name: Upload to PyPI
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}