language-data/.github/workflows/setup.yml
renovate[bot] 5503fad0a6
Some checks are pending
mypy / mypy (push) Waiting to run
Pre-commit check / pre-commit (push) Waiting to run
Distribution / Build packages (push) Waiting to run
Distribution / Publish release to PyPI (push) Blocked by required conditions
Distribution / Create release on GitHub (push) Blocked by required conditions
Languages / lint (push) Waiting to run
Update generated files / submodule-update (push) Waiting to run
chore(deps): replace astral-sh/setup-uv action with astral-sh/setup-uv v8.0.0 (#2401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-19 10:55:39 +00:00

96 lines
2.7 KiB
YAML

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: MIT
name: Distribution
on:
push:
branches-ignore:
- renovate/**
- dependabot/**
tags:
- '*'
pull_request:
permissions:
contents: read
jobs:
setup:
name: Build packages
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: false
version: 0.11.7
- name: Install dependencies
run: uv sync --all-extras --dev
- name: build sdist
run: uv build
- name: twine
run: uvx twine check dist/*
- name: pydistcheck
run: uvx pydistcheck --inspect dist/*
- name: pyroma
run: uvx --with pip pyroma dist/*.tar.gz
- name: check-wheel-contents
run: uvx check-wheel-contents dist/*.whl
- name: check-manifest
run: uvx --with pip check-manifest -v
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
path: dist/*
name: dist
release_pypi:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'WeblateOrg/language-data'
runs-on: ubuntu-24.04
name: Publish release to PyPI
permissions:
# this permission is mandatory for trusted publishing
id-token: write
needs:
- setup
steps:
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: 0.11.7
enable-cache: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist
- name: Publish package
run: uv publish --trusted-publishing always
release_github:
runs-on: ubuntu-24.04
name: Create release on GitHub
permissions:
contents: write
needs:
- setup
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'WeblateOrg/language-data'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist
- env:
VERSION: ${{ github.ref_name }}
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$VERSION" --verify-tag --generate-notes dist/*