From 14808c752f9d9e367d7efe074d325b2ef6291a68 Mon Sep 17 00:00:00 2001 From: jungle Date: Fri, 17 Nov 2023 10:57:29 +0000 Subject: [PATCH] custom action --- .github/workflows/workflow-test.yml | 100 ++++++++++++++++------------ 1 file changed, 58 insertions(+), 42 deletions(-) diff --git a/.github/workflows/workflow-test.yml b/.github/workflows/workflow-test.yml index 40ae52f..806d847 100644 --- a/.github/workflows/workflow-test.yml +++ b/.github/workflows/workflow-test.yml @@ -3,50 +3,66 @@ name: Publish package to TestPyPI on: push jobs: - build: - name: Build distribution + generate: + name: Generate runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: python3 -m build - - name: Store the distribution packages - uses: actions/upload-artifact@v3 - with: - name: python-package-distributions - path: dist/ + - uses: actions/checkout@v4 + - name: Run Swagger Codegen + - uses: ./.github/actions/swagger-codegen + with: + language: python + input: swagger/public.swagger.json + action: generate - publish-to-testpypi: - name: Publish to TestPyPI - needs: - - build - runs-on: ubuntu-latest - - environment: - name: testpypi - url: https://test.pypi.org/p/cudo-compute - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - - steps: - - name: Download all the dists - uses: actions/download-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ \ No newline at end of file +# build: +# name: Build distribution +# needs: +# - generate +# runs-on: ubuntu-latest +# +# steps: +## - uses: actions/checkout@v4 +# - name: Set up Python +# uses: actions/setup-python@v4 +# with: +# python-version: "3.x" +# - name: Install pypa/build +# run: >- +# python3 -m +# pip install +# build +# --user +# - name: Build a binary wheel and a source tarball +# run: python3 -m build +# - name: Store the distribution packages +# uses: actions/upload-artifact@v3 +# with: +# name: python-package-distributions +# path: dist/ +# +# publish-to-testpypi: +# name: Publish to TestPyPI +# needs: +# - build +# runs-on: ubuntu-latest +# +# environment: +# name: testpypi +# url: https://test.pypi.org/p/cudo-compute +# +# permissions: +# id-token: write # IMPORTANT: mandatory for trusted publishing +# +# steps: +# - name: Download all the dists +# uses: actions/download-artifact@v3 +# with: +# name: python-package-distributions +# path: dist/ +# - name: Publish distribution to TestPyPI +# uses: pypa/gh-action-pypi-publish@release/v1 +# with: +# repository-url: https://test.pypi.org/legacy/ \ No newline at end of file