[PATCH] D146491: workflows/release-tasks: Upload lit releases to pypi

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 22:00:06 PDT 2023


tstellar updated this revision to Diff 516621.
tstellar marked 2 inline comments as done.
tstellar added a comment.

- Do some testing before uploading.
- Remove accidental change to __init__.py.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146491/new/

https://reviews.llvm.org/D146491

Files:
  .github/workflows/release-tasks.yml


Index: .github/workflows/release-tasks.yml
===================================================================
--- .github/workflows/release-tasks.yml
+++ .github/workflows/release-tasks.yml
@@ -75,3 +75,36 @@
           git config user.name "llvmbot"
           git commit -a -m "Add ${{ steps.validate-tag.outputs.release-version }} documentation"
           git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main
+
+  release-lit:
+    runs-on: ubuntu-latest
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+      - name: Checkout LLVM
+        uses: actions/checkout at v3
+
+      - name: Install dependencies
+        run: apt-get install -y python3-setuptools
+
+      - name: Test lit
+        run: |
+          cd llvm/utils/lit
+          python3 lit.py tests
+
+      - name: Package lit
+        run: |
+          cd llvm/utils/lit
+          # Remove 'dev' suffix from lit version.
+          sed -i "s/ + 'dev'//g" lit/__init__.py
+          python3 setup.py sdist
+
+      - name: Upload lit TestPyPI
+        uses: pypa/gh-action-pypi-publish at release/v1
+        with:
+          password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
+          repository-url: https://test.pypi.org/legacy/
+
+      - name: Upload lit
+        uses: pypa/gh-action-pypi-publish at release/v1
+        with:
+          password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146491.516621.patch
Type: text/x-patch
Size: 1431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/f68c9b4e/attachment-0001.bin>


More information about the llvm-commits mailing list