This commit is contained in:
commit
7c129cc81b
11 changed files with 1486 additions and 0 deletions
48
.forgejo/workflows/build.yaml
Normal file
48
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue