diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index aaf05d791a026..1d9d0a2eeda25 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -12,6 +12,7 @@ defaults: shell: bash jobs: + init: runs-on: ubuntu-20.04 steps: @@ -23,6 +24,7 @@ jobs: name: dist-packages-${{ github.sha }} path: dist + build-packages: needs: init runs-on: ubuntu-20.04 @@ -40,22 +42,20 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.9 - - name: Install dependencies run: pip install -U setuptools wheel - - name: Build packages env: PACKAGE_NAME: ${{ matrix.pkg-name }} run: | python setup.py sdist bdist_wheel ls -lh dist/ - - uses: actions/upload-artifact@v3 with: name: dist-packages-${{ github.sha }} path: dist + upload-packages: runs-on: ubuntu-20.04 needs: build-packages @@ -73,6 +73,7 @@ jobs: files: 'dist/*' repo-token: ${{ secrets.GITHUB_TOKEN }} + release-version: runs-on: ubuntu-20.04 outputs: @@ -87,6 +88,7 @@ jobs: id: lai-package run: python -c "import lightning as L; print(f'version={L.__version__}')" >> $GITHUB_OUTPUT + signaling: runs-on: ubuntu-20.04 needs: [release-version] @@ -100,12 +102,6 @@ jobs: with: repository: gridai/base-images token: ${{ secrets.PAT_GHOST }} - ref: main - - uses: fregante/setup-git-token@v1 - with: - token: ${{ secrets.PAT_GHOST }} - name: PL Ghost - email: pl-github@grid.ai - name: Update lightning version run: | import json, os @@ -115,18 +111,21 @@ jobs: with open("versions.json", "w") as fw: json.dump(vers, fw) shell: python - - name: GIT Commit + - run: cat versions.json + - name: GIT commit & push + env: + BRANCH_NAME: "trigger/lightning-${{ env.TAG }}" run: | + git config --global user.name "PL Ghost" + git config --global user.email pl-github@grid.ai + git checkout -b ${BRANCH_NAME} git add versions.json - git commit -m "bumping lightning version -> ${TAG}" - cat versions.json - - name: GIT Push - run: | git status - git push + git commit -m "bumping lightning version -> ${TAG}" + git push -u origin ${BRANCH_NAME} -f + waiting: - # TODO: replace with back signal from build images/ loop checking for a specific branch? runs-on: ubuntu-20.04 needs: [release-version, signaling] env: @@ -150,6 +149,7 @@ jobs: time.sleep(60) shell: python + pre-publish-packages: runs-on: ubuntu-20.04 needs: build-packages @@ -179,6 +179,7 @@ jobs: pkg-pattern: "*" pypi-test-token: ${{ secrets.PYPI_TEST_TOKEN_LAI }} + publish-packages: runs-on: ubuntu-20.04 needs: [build-packages, waiting] @@ -208,6 +209,7 @@ jobs: pkg-pattern: "*" pypi-token: ${{ secrets.PYPI_TOKEN_LAI }} + legacy-checkpoints: needs: [build-packages] uses: ./.github/workflows/legacy-checkpoints.yml