/
vshmidt
/
streamlit
Обзор
Документация
Войти
/
vshmidt
/
streamlit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
.github/workflows/release.yml
134 строки
4 KB
Lukas Masuch
Migrate to uv package manager (#13622)
30 янв 2026, 01:23
Не верифицирован
30 янв 2026, 01:23
4d386cc
Код
Авторство
О чём код?
name: Build Release on: # Manual Trigger GH CLI -> gh workflow run release.yml --ref <tag> workflow_dispatch: jobs: run-python-tests: uses: ./.github/workflows/python-tests.yml with: ref: ${{ github.ref_name }} secrets: SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }} SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }} permissions: # Additional permissions for py-coverage-report actions: read pull-requests: write run-javascript-tests: uses: ./.github/workflows/js-tests.yml with: ref: ${{ github.ref_name }} permissions: # Additional permissions for coverage-comment actions: read pull-requests: write run-playwright-tests: uses: ./.github/workflows/playwright.yml with: ref: ${{ github.ref_name }} build-release: runs-on: ubuntu-latest needs: - run-python-tests - run-javascript-tests - run-playwright-tests defaults: run: shell: bash permissions: # Additional permission needed to generate release contents: write id-token: write env: # Name of the tag GIT_TAG: ${{ github.ref_name }} # The owner and repository name GH_REPO: ${{ github.repository }} environment: release steps: - name: Checkout Streamlit code uses: actions/checkout@v6 with: ref: ${{ github.ref_name }} # Save the access token to the local git config, so # later git commands can work. persist-credentials: true submodules: "recursive" fetch-depth: 2 - name: Set Python version vars uses: ./.github/actions/build_info - name: Look up the related GitHub PR branch name # Need GH Token to use gh api env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | pip install requests echo "GH_PR_BRANCH=$(python scripts/get_release_branch.py)" >> $GITHUB_ENV - name: Ensure release branch corresponding to this tag exists env: GH_PR_BRANCH: ${{ env.GH_PR_BRANCH }} run: | BRANCH_VERSION=$(echo "$GH_PR_BRANCH" | sed 's/release\///' ) if [ "$BRANCH_VERSION" != "$GIT_TAG" ] then echo "ERROR: release branch corresponding to this tag does not exist." exit 1 fi - name: Setup virtual env uses: ./.github/actions/make_init with: python_version: ${{ env.PYTHON_MAX_VERSION }} - name: Verify git tag vs. version env: GIT_TAG: ${{ env.GIT_TAG }} run: uv run python scripts/verify_version.py --tag $GIT_TAG - name: Set release version from tag name env: GIT_TAG: ${{ env.GIT_TAG }} run: echo "STREAMLIT_RELEASE_VERSION=$GIT_TAG" >> $GITHUB_ENV - name: Fix apt mirrors if: ${{ runner.os == 'Linux' }} uses: ./.github/actions/apt_mirror_fix - name: Create Package timeout-minutes: 120 run: | sudo apt install rsync make package - name: Store Package uses: actions/upload-artifact@v6 with: name: Release path: lib/dist - name: Upload to PyPI uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 with: packages-dir: lib/dist/ - name: Create GitHub Release env: GIT_TAG: ${{ env.GIT_TAG }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | python scripts/create_release.py - name: Successful Release Slack Message if: ${{ success() }} env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} RUN_ID: ${{ github.run_id }} run: python scripts/slack_notifications.py release success - name: Failed Release Slack Message if: ${{ failure() }} env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} RUN_ID: ${{ github.run_id }} run: python scripts/slack_notifications.py release failure