diff --git a/.github/actions/build-app/action.yaml b/.github/actions/build-app/action.yaml new file mode 100644 index 00000000..23273108 --- /dev/null +++ b/.github/actions/build-app/action.yaml @@ -0,0 +1,22 @@ +name: Build Liberation package +description: Assembles the full Liberation application. +runs: + using: composite + steps: + - name: Build client + shell: powershell + run: | + cd client + npm run build + + - name: Build binaries + shell: powershell + run: | + ./venv/scripts/activate + $env:PYTHONPATH=".;./pydcs" + pyinstaller pyinstaller.spec + + - name: Install changelog + shell: powershell + run: | + Copy-Item .\changelog.md .\dist diff --git a/.github/actions/build-front-end/action.yaml b/.github/actions/build-front-end/action.yaml deleted file mode 100644 index 7967ad42..00000000 --- a/.github/actions/build-front-end/action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Front-end build -description: Builds the Liberation front-end. -runs: - using: composite - steps: - - name: Build client - shell: powershell - run: | - cd client - npm run build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0729ebe9..d49fde20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,18 +19,12 @@ jobs: - name: mypy uses: ./.github/actions/mypy - - name: update build number + - name: Set build number run: | [IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER) - - name: Build front-end - uses: ./.github/actions/build-front-end - - - name: Build binaries - run: | - ./venv/scripts/activate - $env:PYTHONPATH=".;./pydcs" - pyinstaller pyinstaller.spec + - name: Build app + uses: ./.github/actions/build-app - name: Create archive run: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6ad4834..8a67a0a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,27 +18,17 @@ jobs: - name: Set up JS environment uses: ./.github/actions/setup-liberation-js - - name: Finalize version - run: | - New-Item -ItemType file resources\final - - name: mypy uses: ./.github/actions/mypy - - name: Build front-end - uses: ./.github/actions/build-front-end - - - name: Build binaries + - name: Finalize build run: | - ./venv/scripts/activate - $env:PYTHONPATH=".;./pydcs" - pyinstaller pyinstaller.spec + New-Item -ItemType file resources\final - - name: Create Installer - env: - TAG_NAME: ${{ github.ref }} - run: | - Copy-Item .\changelog.md .\dist + - name: Build app + uses: ./.github/actions/build-app + with: + release: true - uses: actions/upload-artifact@v2 with: