Skip to content

tech

tech #104

Workflow file for this run

name: Build and test wheels
on:
push:
branches:
- main
- test-publish
tags:
- '*'
release:
types: [published]
jobs:
build-distribution-artifacts:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
submodules: true
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
version: "0.8.15"
- name: Build artifacts
# working-directory: ${{ inputs.pyproject-directory }}
run: uv build
- name: Upload artifacts
# working-directory: ${{ inputs.pyproject-directory }}
uses: actions/upload-artifact@v6.0.0
with:
name: dist
path: dist/
if-no-files-found: error
publish:
runs-on: ubuntu-24.04
environment: release
needs: [ 'build-distribution-artifacts' ]
permissions:
id-token: write
steps:
- name: Download artifacts
# working-directory: ${{ inputs.pyproject-directory }}
uses: actions/download-artifact@v7.0.0
with:
name: dist
path: dist
- name: Show artifacts
# working-directory: ${{ inputs.pyproject-directory }}
run: ls -lah dist
- name: Publish distribution to Test PyPI
# working-directory: ${{ inputs.pyproject-directory }}
if: github.event_name == 'push' && github.ref_name == 'test-publish'
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish distribution to PRODUCTION PyPI
# working-directory: ${{ inputs.pyproject-directory }}
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0