Skip to content

PEX Build and Upload #63

PEX Build and Upload

PEX Build and Upload #63

---
name: PEX Build and Upload
on:
workflow_dispatch:
workflow_run:
workflows:
- Upload Python Package
types:
- completed
jobs:
pex_build_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: |-
pipx install poetry
pipx inject poetry poetry-plugin-export --force
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: |
3.10
3.11
3.12
- name: Install libraries dependencies
run: |
poetry export --without-hashes --format=requirements.txt > requirements.txt
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.17
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pex
- name: Build Pex
run: |-
mkdir -p dist
pex .[gojsonnet] -r requirements.txt \
--python-shebang='#!/usr/bin/env python3' \
--python=python3.11 \
--python=python3.10 \
--python=python3.12 \
-m kapitan \
-o dist/kapitan.linux-x86_64.pex
dist/kapitan.linux-x86_64.pex --help
- name: Add linux-x86_64 pex to assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/kapitan.linux-x86_64.pex