Skip to content

chore(version): v0.0.3 #14

chore(version): v0.0.3

chore(version): v0.0.3 #14

Workflow file for this run

name: "Build, Sign, and Publish to PyPI"
on:
push:
branches:
- "main"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 100
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'
- name: Install UV
uses: astral-sh/setup-uv@v2
- name: Set up Python using UV
run: uv python install
- name: Build package using UV
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish:
name: Publish Python Distribution to PyPI
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/llq-sdk
permissions:
id-token: write
steps:
- name: Download the distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://pypi.org/legacy/
sign-files:
name: Sign and Upload Python Distribution with Sigstore
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v')
needs:
- publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download the distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign the distributions with Sigstore
uses: sigstore/[email protected]
with:
inputs: >
./dist/*.tar.gz
./dist/*.whl
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'