30 lines
743 B
YAML
30 lines
743 B
YAML
name: Publish package
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
- name: Build package
|
|
run: ~/.local/bin/uv build
|
|
|
|
- name: Publish to the Gitea package registry
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PACKAGE_PUBLISH_USERNAME }}
|
|
TWINE_PASSWORD: ${{ secrets.PACKAGE_PUBLISH_TOKEN }}
|
|
run: |
|
|
~/.local/bin/uv tool install twine
|
|
~/.local/bin/twine upload \
|
|
--repository-url "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/pypi" \
|
|
dist/*
|