Skip to content

[pre-commit.ci] auto fixes from pre-commit.com hooks #111

[pre-commit.ci] auto fixes from pre-commit.com hooks

[pre-commit.ci] auto fixes from pre-commit.com hooks #111

Workflow file for this run

---
name: "πŸπŸ“¦ Test build and publish to Test PyPI"
# GitHub/PyPI trusted publisher documentation:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# yamllint disable-line rule:truthy
on: push
env:
python-version: "3.8"
jobs:
publish:
name: "πŸπŸ“¦ Test build and publish"
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
# IMPORTANT: mandatory for trusted publishing
id-token: write
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup PDM for build commands"
uses: pdm-project/setup-pdm@v4
with:
version: 2.10.0
- name: "Setup Python"
uses: actions/[email protected]
with:
python-version: ${{ env.python-version }}
- name: "Update version and output Run ID"
run: |
value=`scripts/version.sh`
scripts/dev-versioning.sh "$value-dev${{ github.run_id }}"
echo "$value-dev${{ github.run_id }}"
echo ${{ github.run_id }}
- name: "Output Run Number"
run: echo ${{ github.run_number }}
- name: "Build with PDM backend"
run: |
pdm build
- name: "Sign packages with Sigstore"
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: "Remove files unsupported by PyPi"
run: |
if [ -f dist/buildvars.txt ]; then
rm dist/buildvars.txt
fi
rm dist/*.sigstore* | true
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}