From d7b9ddb871bfd67ee43d885ce9a953950b08e17f Mon Sep 17 00:00:00 2001 From: cupen Date: Tue, 26 Mar 2024 17:00:18 +0800 Subject: [PATCH] ci: fix publish --- .github/workflows/python-publish.yml | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3790244..9aab08f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,11 +1,3 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Publish on: @@ -13,24 +5,16 @@ on: tags: [ "*" ] workflow_dispatch: -permissions: - contents: read - +# https://github.com/pypa/gh-action-pypi-publish jobs: deploy: runs-on: ubuntu-latest - + environment: + name: pypi + url: https://pypi.org/p/excel2xx + permissions: + id-token: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install dependencies - run: pip install build - - - name: Build package - run: python -m build - - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: