PEX Build and Upload #61
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
- 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 | |
- 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 |