Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ defaults:
shell: bash

jobs:

init:
runs-on: ubuntu-20.04
steps:
Expand All @@ -23,6 +24,7 @@ jobs:
name: dist-packages-${{ github.sha }}
path: dist


build-packages:
needs: init
runs-on: ubuntu-20.04
Expand All @@ -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
Expand All @@ -73,6 +73,7 @@ jobs:
files: 'dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}


release-version:
runs-on: ubuntu-20.04
outputs:
Expand All @@ -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]
Expand All @@ -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: [email protected]
- name: Update lightning version
run: |
import json, os
Expand All @@ -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 [email protected]
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:
Expand All @@ -150,6 +149,7 @@ jobs:
time.sleep(60)
shell: python


pre-publish-packages:
runs-on: ubuntu-20.04
needs: build-packages
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -208,6 +209,7 @@ jobs:
pkg-pattern: "*"
pypi-token: ${{ secrets.PYPI_TOKEN_LAI }}


legacy-checkpoints:
needs: [build-packages]
uses: ./.github/workflows/legacy-checkpoints.yml
Expand Down