Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
104 changes: 96 additions & 8 deletions .github/workflows/mobile-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ permissions:

on:
workflow_dispatch:
inputs:
job_to_run:
description: 'Select the job to run'
required: true
default: 'all'
type: choice
options:
- all
- android
- python
schedule:
# Mondays at 1pm UTC (8am EST)
- cron: "0 13 * * 1"
Expand All @@ -18,16 +28,14 @@ jobs:
contents: read
uses: ./.github/workflows/_load_env.yml

release:
android-release:
permissions:
contents: read
packages: read
if: >-
${{
github.repository == 'envoyproxy/envoy'
&& (github.event.schedule
|| !contains(github.actor, '[bot]'))
}}
${{ github.repository == 'envoyproxy/envoy' &&
(github.event.schedule || !contains(github.actor, '[bot]')) &&
(github.event.inputs.job_to_run == 'all' || github.event.inputs.job_to_run == 'android' || github.event_name == 'schedule') }}
needs: env
uses: ./.github/workflows/_mobile_container_ci.yml
with:
Expand Down Expand Up @@ -76,8 +84,12 @@ jobs:
//:android_dist
output: envoy

deploy:
needs: release
android-deploy:
needs: android-release
if: >-
${{ always() &&
(github.event.inputs.job_to_run == 'all' || github.event.inputs.job_to_run == 'android' || github.event_name == 'schedule') &&
(needs.android-release.result == 'success') }}
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -141,3 +153,79 @@ jobs:
${{ matrix.output }}-pom.xml.asc \
${{ matrix.output }}-sources.jar.asc \
${{ matrix.output }}-javadoc.jar.asc
python-release:
permissions:
actions: read
contents: read
packages: read
if: >-
${{ github.repository == 'envoyproxy/envoy' &&
(github.event_name == 'workflow_dispatch') &&
(github.event.inputs.job_to_run == 'all' || github.event.inputs.job_to_run == 'python') }}
needs: env
name: Build and Publish Python Wheel
uses: ./.github/workflows/_mobile_container_ci.yml
with:
args: ${{ matrix.args }}
container: ${{ fromJSON(needs.env.outputs.build-image).mobile }}
container-output: |
"bazel-bin/library/python/": build/
request: ${{ needs.env.outputs.request }}
steps-post: |
- name: Repair wheel
run: |
mkdir -p /tmp/dist
WHEEL_PATH=$(find /tmp/container-output/build -name "*.whl" | head -n 1)

if [ -z "$WHEEL_PATH" ]; then
echo "p Error: No wheel file found in /tmp/container-output/build"
ls -R /tmp/container-output/
exit 1
fi
python3 -m venv envoy_wheel
source envoy_wheel/bin/activate
pip install patchelf auditwheel

auditwheel repair "$WHEEL_PATH" --wheel-dir /tmp/dist
shell: bash
target: ${{ matrix.target }}
upload-name: python-wheel
upload-path: /tmp/dist/*.whl
strategy:
fail-fast: false
matrix:
include:
- target: envoy_mobile_wheel
args: >-
build
--config=ci
--config=mobile-rbe
--config=mobile-release
-c opt --strip=always
//library/python:envoy_mobile_wheel
--//library/python:python_platform="manylinux2014_x86_64"
--@rules_python//python/config_settings:python_version="3.13.1"
python-publish:
needs: python-release
if: >-
${{ always() &&
(github.event.inputs.job_to_run == 'all' || github.event.inputs.job_to_run == 'python') &&
(needs.python-release.result == 'success') }}
permissions:
contents: read
id-token: write
packages: read
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
environment:
name: pypi
url: https://pypi.org/p/<your-package-name>
steps:
- uses: actions/download-artifact@v4
with:
name: python-wheel
path: .
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions mobile/library/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ py_wheel(
":is_macos_arm64": "macosx_11_0_arm64",
"//conditions:default": "any",
}),
abi = "cp313",
python_tag = python_tag(),
strip_path_prefixes = [
"mobile/library/python",
Expand Down
Loading