From bf33c2235238c50e13ee2c4fff0ef3863fbdb1e1 Mon Sep 17 00:00:00 2001 From: Freeman <105403280+F-WRunTime@users.noreply.github.com> Date: Fri, 21 Jun 2024 05:07:06 -0600 Subject: [PATCH] Publish `pyk` on PyPI (#4416) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4239 ~Blocked on~: * #4438 * #4461 Add job `pyk-publish` to publish `pyk` on PyPI (under package name `kframework`). Release workflow changes from ``` release --- notify-dependents \ pyk-build-docs --- gh-pages ``` to ``` release --- pyk-publish --- notify-dependents \ pyk-build-docs --- gh-pages ``` --------- Co-authored-by: Tamás Tóth --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 840a5b07afd..432b893e44f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -404,10 +404,41 @@ jobs: const { owner, repo } = context.repo await github.rest.repos.updateRelease({ owner, repo, release_id: ${{ needs.set-release-id.outputs.release_id }}, prerelease: false }) + pyk-publish: + name: 'Publish pyk' + runs-on: ubuntu-latest + environment: production + permissions: + id-token: write + needs: release + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install Poetry + uses: Gr1N/setup-poetry@v9 + + - name: Build pyk + working-directory: pyk + run: | + make build + + - name: Publish pyk to PyPI + uses: pypa/gh-action-pypi-publish@v1 + with: + packages-dir: pyk/dist + user: __token__ + password: ${{ secrets.PYPI_TOKEN }} + notify-dependents: name: 'Notify Dependents' runs-on: ubuntu-latest - needs: release + needs: pyk-publish steps: - name: Check out code uses: actions/checkout@v4 @@ -463,7 +494,7 @@ jobs: name: 'GitHub Pages deployment' runs-on: ubuntu-24.04 timeout-minutes: 30 - needs: [pyk-build-docs, release] + needs: [pyk-build-docs, pyk-publish] steps: - name: 'Install pandoc/texlive/calibre' run: |