Skip to content

Merge pull request #594 from gefyrahq/dependabot/pip/client/black-24.4.1 #175

Merge pull request #594 from gefyrahq/dependabot/pip/client/black-24.4.1

Merge pull request #594 from gefyrahq/dependabot/pip/client/black-24.4.1 #175

name: Build Linux binary
env:
PYAPP_DOWNLOAD: https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz
on:
workflow_dispatch: {}
workflow_call:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Determine App Version
working-directory: client/
run: |
python ../.github/scripts/get_version.py
- name: Setup PyAPP and build
working-directory: client/
env:
PYAPP_FULL_ISOLATION: 1
PYAPP_PROJECT_NAME: gefyra
PYAPP_EXEC_SPEC: gefyra.cli.main:main
PYAPP_PIP_EXTRA_ARGS: click alive-progress tabulate cli-tracker
PYAPP_DISTRIBUTION_EMBED: 1
run: |
poetry build
curl ${PYAPP_DOWNLOAD} -Lo pyapp-source.tar.gz
tar -xzf pyapp-source.tar.gz
mv pyapp-v* pyapp-latest
cd pyapp-latest
cargo build --release
mv target/release/pyapp ../../gefyra && chmod +x ../../gefyra
cp ../README.md ../../README.md
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64
path: |
gefyra
LICENSE
README.md
retention-days: 5
- name: Create release zip
if: ${{ github.event.release && github.event.action == 'published' }}
run: zip gefyra-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64.zip "gefyra" "LICENSE" "README.md"
- name: Attach files to release
uses: softprops/action-gh-release@v2
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: gefyra-${{ env.PYAPP_PROJECT_VERSION }}-linux-amd64.zip