Skip to content

chore(deps): Bump actions/download-artifact from 7.0.0 to 8.0.0 (#111) #124

chore(deps): Bump actions/download-artifact from 7.0.0 to 8.0.0 (#111)

chore(deps): Bump actions/download-artifact from 7.0.0 to 8.0.0 (#111) #124

name: publish-to-test-pypi
on:
push:
branches: ["main"]
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@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
- 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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
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@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
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