Skip to content

chore(deps): Bump actions/setup-python from 6.2.0 to 6.3.0 (#161) #160

chore(deps): Bump actions/setup-python from 6.2.0 to 6.3.0 (#161)

chore(deps): Bump actions/setup-python from 6.2.0 to 6.3.0 (#161) #160

name: publish-to-test-pypi
on:
push:
branches: ["main"]
permissions:
contents: read
pull-requests: read
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Install hatch
run: uv tool install hatch
- name: Inject unique build tag into VERSION file
run: |
BASE_VERSION=$(cat VERSION)
BUILD=".dev${{ github.run_id }}${{ github.run_number }}${{ github.run_attempt }}"
echo "${BASE_VERSION}${BUILD}" > VERSION
- name: Build distributions with uv
run: uv build
- name: Upload distributions as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: python-package-distributions-${{ github.run_id }}
path: dist/
publish-to-test-pypi:
name: Publish Python distribution to TestPyPI
needs: [build]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/python-em511
permissions:
id-token: write
steps:
- name: Download all build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions-${{ github.run_id }}
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true