Skip to content

test

test #4

name: "📦 Publish"
on:
push:
branches:
- "test"
workflow_dispatch: null
env:
PYPI_TEST_REPOSITORY: "https://test.pypi.org/legacy/"
jobs:
tag:
name: "Tag"
permissions:
contents: "write"
uses: "kurtmckee/github-workflows/.github/workflows/create-tag-and-release.yaml@build-packages-for-publication"
build:
name: "Build"
needs:
- "tag"
permissions:
contents: "read"
uses: "kurtmckee/github-workflows/.github/workflows/build-python-package.yaml@build-packages-for-publication"
publish:
name: "Publish"
needs:
- "build"
runs-on: "ubuntu-slim"
environment: "PyPI (Test)"
permissions:
id-token: "write"
steps:
- name: "Download the built packages"
uses: "actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131" # v7.0.0
with:
artifact-ids: "${{ needs.build.outputs.artifact-id }}"
path: "${{ needs.build.outputs.packages-path }}"
- name: "Publish package distributions to PyPI"
uses: "pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e" # v1.13.0
with:
repository-url: "${{ env.PYPI_TEST_REPOSITORY }}"
packages-dir: "${{ needs.build.outputs.packages-path }}"