From dfdd06f2b6b94e97145d0231014281cef77e7168 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 9 Dec 2022 10:47:43 +0100 Subject: [PATCH 1/4] ci: update signaling --- .github/workflows/release-pypi.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index aaf05d791a026..02558dedebaa8 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -6,12 +6,14 @@ on: branches: [master, "release/*"] release: types: [published] + pull_request: {} # Fixme defaults: run: shell: bash jobs: + init: runs-on: ubuntu-20.04 steps: @@ -23,6 +25,7 @@ jobs: name: dist-packages-${{ github.sha }} path: dist + build-packages: needs: init runs-on: ubuntu-20.04 @@ -40,22 +43,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 +74,7 @@ jobs: files: 'dist/*' repo-token: ${{ secrets.GITHUB_TOKEN }} + release-version: runs-on: ubuntu-20.04 outputs: @@ -87,6 +89,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,10 +103,8 @@ 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 @@ -115,18 +116,19 @@ 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 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} + 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 +152,7 @@ jobs: time.sleep(60) shell: python + pre-publish-packages: runs-on: ubuntu-20.04 needs: build-packages @@ -179,6 +182,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 +212,7 @@ jobs: pkg-pattern: "*" pypi-token: ${{ secrets.PYPI_TOKEN_LAI }} + legacy-checkpoints: needs: [build-packages] uses: ./.github/workflows/legacy-checkpoints.yml From e601583564d4012d17b0caa3fd8f535cf7c6e4bd Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 9 Dec 2022 10:52:54 +0100 Subject: [PATCH 2/4] config --- .github/workflows/release-pypi.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 02558dedebaa8..120ee5e727f95 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -103,10 +103,6 @@ jobs: with: repository: gridai/base-images token: ${{ secrets.PAT_GHOST }} - - uses: fregante/setup-git-token@v1 - with: - name: PL Ghost - email: pl-github@grid.ai - name: Update lightning version run: | import json, os @@ -121,6 +117,8 @@ jobs: 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 status From 17ae90cec4c69208a97fea6e1dc6418933dbd89b Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 9 Dec 2022 10:57:45 +0100 Subject: [PATCH 3/4] ... --- .github/workflows/release-pypi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 120ee5e727f95..10ce7a921029f 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -6,7 +6,6 @@ on: branches: [master, "release/*"] release: types: [published] - pull_request: {} # Fixme defaults: run: From feaee75c61aae55e0a1e6abe8ffdf06f18a34ab0 Mon Sep 17 00:00:00 2001 From: Jirka Date: Fri, 9 Dec 2022 11:03:05 +0100 Subject: [PATCH 4/4] -f --- .github/workflows/release-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 10ce7a921029f..1d9d0a2eeda25 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -122,7 +122,7 @@ jobs: git add versions.json git status git commit -m "bumping lightning version -> ${TAG}" - git push -u origin ${BRANCH_NAME} + git push -u origin ${BRANCH_NAME} -f waiting: