Skip to content

2.0.2

2.0.2 #162

# This workflow will build a PyOxidizer binary for linux when a tag is pushed
name: Build Linux binary
env:
PYOXIDIZER_DOWNLOAD: https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.18.0/pyoxidizer-0.18.0-linux-x86_64.zip
on:
workflow_dispatch: {}
workflow_call:
push:
tags:
- '*'
release:
types: [published]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup PyOxidizer and build
working-directory: client/
run: |
wget ${PYOXIDIZER_DOWNLOAD}
unzip pyoxidizer-0.18.0-linux-x86_64.zip
sudo chmod +x ./pyoxidizer
./pyoxidizer build exe --release
cp `find build/ -name "gefyra"` ../gefyra
strip -s ../gefyra
cp README.md ../README.md
cat pyproject.toml | grep version -m 1 | awk '{ print "APP_VERSION="substr($3, 2, length($3) -2)}' >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: gefyra-${{ env.APP_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.APP_VERSION }}-linux-amd64.zip "gefyra" "LICENSE" "README.md"
- name: Attach files to release
uses: softprops/action-gh-release@v1
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: gefyra-${{ env.APP_VERSION }}-linux-amd64.zip