From da4b40f75d0581eafc54b7b746349782e0777647 Mon Sep 17 00:00:00 2001 From: Zymrael Date: Wed, 1 Mar 2023 11:08:30 +0900 Subject: [PATCH] [Publishing] Check identify for dispatch --- .github/workflows/publish.yaml | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4d04ede..c77e060 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -8,22 +8,23 @@ on: workflow_dispatch: jobs: - build: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - with: - python-version: 3.8 + if: github.actor == Zymrael + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: 3.8 - - name: Build - run: | - curl -sSL https://install.python-poetry.org | python3 - - poetry lock - poetry build + - name: Build + run: | + curl -sSL https://install.python-poetry.org | python3 - + poetry lock + poetry build - - name: Publish distribution 📦 to PyPI - if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - run: | - poetry config pypi-token.pypi ${{ secrets.pypi_token }} - poetry publish + - name: Publish distribution 📦 to PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + run: | + poetry config pypi-token.pypi ${{ secrets.pypi_token }} + poetry publish