knoc-plugin-template/.forgejo/workflows/build.yaml
phil 7c129cc81b
All checks were successful
/ build (push) Successful in 5s
Inital commit
2025-05-28 17:36:06 +02:00

48 lines
1.2 KiB
YAML

on:
push:
workflow_dispatch:
inputs:
verbose:
description: "Verbose"
required: false
default: false
type: boolean
jobs:
build:
runs-on: container
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
with:
version: "0.7.6"
- name: Install
run: uv sync
- name: Get version
run: echo "VERSION=$(.venv/bin/dunamai from any --style semver)" >> $GITHUB_ENV
- name: Version
run: echo $VERSION
- name: Get distance from tag
run: echo "DISTANCE=$(.venv/bin/dunamai from any --format '{distance}')" >> $GITHUB_ENV
- name: Distance
run: echo $DISTANCE
- name: Build wheel
if: env.DISTANCE == '0'
run: uv build --wheel
- name: Publish Python package (home)
if: env.DISTANCE == '0'
env:
LOCAL_PYPI_TOKEN: ${{ secrets.LOCAL_PYPI_TOKEN }}
run: uv publish --publish-url https://code.philo.ydns.eu/api/packages/K-Net/pypi --token $LOCAL_PYPI_TOKEN
continue-on-error: true