From 3a2254488e997401c4a866b30a99aa6cba6ef21d Mon Sep 17 00:00:00 2001 From: smf Date: Fri, 19 Apr 2024 11:54:20 +0800 Subject: [PATCH] add pypi publish workflow --- .github/workflows/publish_pypi.yml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish_pypi.yml diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000..ce24df4 --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,34 @@ +on: + workflow_call: + inputs: + artifact-skip: + required: false + type: boolean + default: false + artifact-name: + required: false + type: string + default: 'artifact' + runs_on: + required: false + type: string + default: 'ubuntu_act_on_20' + +jobs: + publish-docker-image: + runs-on: ${{ inputs.runs_on }} + # container: + # image: catthehacker/ubuntu:act-latest + env: + RUNNER_TOOL_CACHE: /toolcache + steps: + - uses: actions/download-artifact@v3 + if: ${{ inputs.artifact-skip != true }} + with: + name: ${{ inputs.artifact-name }} + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + packages-dir: pub/ \ No newline at end of file