Skip to content

chore(dependabot): update dependabot interval to weekly (#110) #118

chore(dependabot): update dependabot interval to weekly (#110)

chore(dependabot): update dependabot interval to weekly (#110) #118

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@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7.2.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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.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@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.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