Skip to content

chore(deps): Bump github/codeql-action from 4.35.2 to 4.35.3 (#139) #148

chore(deps): Bump github/codeql-action from 4.35.2 to 4.35.3 (#139)

chore(deps): Bump github/codeql-action from 4.35.2 to 4.35.3 (#139) #148

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- 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