Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Nov 5, 2024
1 parent e4f252e commit cc25aeb
Showing 1 changed file with 44 additions and 43 deletions.
87 changes: 44 additions & 43 deletions .github/workflows/release-and-publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ jobs:
- start-backend-export-swagger
strategy:
matrix:
generator: [python, python-pydantic-v1, typescript-angular]
# generator: [python, python-pydantic-v1, typescript-angular]
generator: [typescript-angular]

steps:
- name: Checkout repository
Expand Down Expand Up @@ -190,45 +191,45 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

pypi-publish:
needs: generate-upload-sdk
runs-on: ubuntu-latest
strategy:
matrix:
sdk_type: [python, python-pydantic-v1]
environment:
name: ${{ matrix.sdk_type }}-sdk-package
url: ${{ matrix.sdk_type == 'python' && 'https://pypi.org/project/Scicat-Python-SDK/' || 'https://pypi.org/project/Scicat-Pydantic-SDK/' }}
permissions:
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Download Python SDK Artifact
uses: actions/download-artifact@v4
with:
name: sdk-${{ matrix.sdk_type }}-${{github.sha}}
path: ./sdk

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
working-directory: ./sdk/${{ matrix.sdk_type }}/

- name: Build package
run: |
python setup.py sdist bdist_wheel
working-directory: ./sdk/${{ matrix.sdk_type }}/

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./sdk/${{ matrix.sdk_type }}/dist/
# pypi-publish:
# needs: generate-upload-sdk
# runs-on: ubuntu-latest
# strategy:
# matrix:
# sdk_type: [python, python-pydantic-v1]
# environment:
# name: ${{ matrix.sdk_type }}-sdk-package
# url: ${{ matrix.sdk_type == 'python' && 'https://pypi.org/project/Scicat-Python-SDK/' || 'https://pypi.org/project/Scicat-Pydantic-SDK/' }}
# permissions:
# id-token: write

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}

# - name: Download Python SDK Artifact
# uses: actions/download-artifact@v4
# with:
# name: sdk-${{ matrix.sdk_type }}-${{github.sha}}
# path: ./sdk

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel
# working-directory: ./sdk/${{ matrix.sdk_type }}/

# - name: Build package
# run: |
# python setup.py sdist bdist_wheel
# working-directory: ./sdk/${{ matrix.sdk_type }}/

# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: ./sdk/${{ matrix.sdk_type }}/dist/

0 comments on commit cc25aeb

Please sign in to comment.