diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml deleted file mode 100644 index b37c5b3b6..000000000 --- a/.github/workflows/publish-pypi.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Upload Beaker packages to PyPI - -on: - release: - types: [created] - -jobs: - deploy-client-package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_BKR_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_BKR_CLIENT_PASSWORD }} - run: | - cd Client - python setup.py sdist bdist_wheel - twine upload dist/* - - deploy-common-package: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_BKR_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_BKR_COMMON_PASSWORD }} - run: | - cd Common - python setup.py sdist bdist_wheel - twine upload dist/* - diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..836f9f3c0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,54 @@ +name: Publish + +#on: +# push: +# tags: +# - 'beaker-*' +on: [pull_request] + +jobs: + build-python-package: + strategy: + matrix: + component: + - "Common" + - "Client" + name: Build python package + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install python dependencies + run: pip install --upgrade pip && pip install build + - name: Build python package + run: cd ${{ matrix.component }} && python -m build + - name: Upload python artifacts + uses: actions/upload-artifact@v4 + with: + path: ${{ matrix.component }}/dist + name: artifact-${{ matrix.component }} + + publish-python-package: + needs: + - "build-python-package" +# environment: production +# permissions: +# id-token: write + strategy: + matrix: + component: + - "Common" + - "Client" + name: Upload package to PyPI + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: artifact-${{ matrix.component }} + - name: Display structure of downloaded files + run: ls -R