From 1bb290f42f0aab99857fbf65497fa17cc658c5aa Mon Sep 17 00:00:00 2001 From: David Grieser <61581280+dgrieser@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:20:32 +0200 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0f0249b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: CI Pipeline + +on: + push: + tags: + - '*' + +env: + LINUX_AMD64_BINARY: ${{ github.event.repository.name }}-linux-amd64-${{ github.ref_name }}.tar.gz + PACKAGE_REGISTRY_URL: ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }} + +jobs: + build: + runs-on: ubuntu-latest + container: + image: python:3.8 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -V + echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV + sed -i "s/^version=.*/version='${{ env.VERSION }}'/" version.py + pip install -U pip + pip install -r requirements.txt + pyinstaller ${{ github.event.repository.name }} --onefile + + - name: Test application + run: | + ./dist/${{ github.event.repository.name }} --version