Skip to content

Commit

Permalink
Release Betty Desktop for Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartfeenstra committed Dec 27, 2023
1 parent aa03b3a commit de07a2c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/pull-request-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
strategy:
matrix:
include:
- name: Linux
os: ubuntu-20.04
dist_name: betty-linux
- name: macOS
os: macos-11
dist_name: betty-macos
Expand Down Expand Up @@ -78,16 +81,33 @@ jobs:
with:
python-version: '3.12'

- name: Install APT dependencies
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get update
apt_packages=(
libegl1-mesa # For Qt
libx11-xcb-dev # For Qt
'^libxcb.*-dev' # For Qt
libxkbcommon-x11-0 # For Qt
)
sudo apt-get install "${apt_packages[@]}"
- name: Build the executable
run: ./bin/build-pyinstaller '${{ env.betty_tag }}-${{ github.event.pull_request.head.sha }}'
shell: bash

- name: Zip the macOS executable
- name: Zip the Linux package
if: startsWith(runner.os, 'Linux')
run: zip -r -X './dist/${{ matrix.dist_name }}-${{ github.event.pull_request.head.sha }}.zip' './dist/betty'
shell: bash

- name: Zip the macOS package
if: startsWith(runner.os, 'macOS')
run: zip -X './dist/${{ matrix.dist_name }}-${{ github.event.pull_request.head.sha }}.zip' './dist/betty'
run: zip -r -X './dist/${{ matrix.dist_name }}-${{ github.event.pull_request.head.sha }}.zip' './dist/betty'
shell: bash

- name: Zip the Windows executable
- name: Zip the Windows package
if: startsWith(runner.os, 'Windows')
run: Compress-Archive '.\dist\betty' '.\dist\${{ matrix.dist_name }}-${{ github.event.pull_request.head.sha }}.zip'

Expand All @@ -109,7 +129,7 @@ jobs:
shell: bash

- name: Notify collaborators of the release
run: gh pr comment '${{ github.event.pull_request.number }}' --body $'Uploaded Betty for commit ${{ github.event.pull_request.head.sha }}. You can download it, test it, and post your feedback in a comment to this pull request 💕\n\n- [Betty Desktop for macOS 🍎](https://github.com/bartfeenstra/betty/releases/download/${{ env.betty_tag }}/betty-macos-${{ github.event.pull_request.head.sha }}.zip)\n- [Betty Desktop for Windows 🪟](https://github.com/bartfeenstra/betty/releases/download/${{ env.betty_tag }}/betty-windows-${{ github.event.pull_request.head.sha }}.zip)\n\nThe download will stop working when the pull request is closed.'
run: gh pr comment '${{ github.event.pull_request.number }}' --body $'Uploaded Betty for commit ${{ github.event.pull_request.head.sha }}. You can download it, test it, and post your feedback in a comment to this pull request 💕\n\n- [Betty Desktop for **Linux** 🐧](https://github.com/bartfeenstra/betty/releases/download/${{ env.betty_tag }}/betty-linux-${{ github.event.pull_request.head.sha }}.zip)\n- [Betty Desktop for **macOS** 🍎](https://github.com/bartfeenstra/betty/releases/download/${{ env.betty_tag }}/betty-macos-${{ github.event.pull_request.head.sha }}.zip)\n- [Betty Desktop for **Windows** 🪟](https://github.com/bartfeenstra/betty/releases/download/${{ env.betty_tag }}/betty-windows-${{ github.event.pull_request.head.sha }}.zip)\n\nThese downloads will stop working when the pull request is closed.'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release-build-pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: Zip the macOS executable
if: startsWith(runner.os, 'macOS')
run: zip -X ./dist/${{ matrix.dist_file_name }}.zip ./dist/${{ matrix.dist_file_name }}
run: zip -r -X ./dist/${{ matrix.dist_file_name }}.zip ./dist/${{ matrix.dist_file_name }}
shell: bash

- name: Zip the Windows executable
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ jobs:
sudo apt-get install "${apt_packages[@]}"
- name: Build the development environment
run: |
./bin/build-dev
run: ./bin/build-dev
shell: bash

- name: Get the Cypress cache directory
Expand All @@ -118,14 +117,12 @@ jobs:
- name: Run the tests
if: startsWith(runner.os, 'Linux')
run: |
./bin/test
run: BETTY_TEST_SKIP_PYINSTALLER=true ./bin/test
shell: bash

- name: Run the tests
if: ${{ ! startsWith(runner.os, 'Linux') }}
run: |
BETTY_TEST_SKIP_SHELLCHECK=true BETTY_TEST_SKIP_FLAKE8=true BETTY_TEST_SKIP_MYPY=true BETTY_TEST_SKIP_STYLELINT=true BETTY_TEST_SKIP_ESLINT=true BETTY_TEST_SKIP_CYPRESS=true BETTY_TEST_SKIP_PYINSTALLER=true ./bin/test
run: BETTY_TEST_SKIP_SHELLCHECK=true BETTY_TEST_SKIP_FLAKE8=true BETTY_TEST_SKIP_MYPY=true BETTY_TEST_SKIP_STYLELINT=true BETTY_TEST_SKIP_ESLINT=true BETTY_TEST_SKIP_CYPRESS=true BETTY_TEST_SKIP_PYINSTALLER=true ./bin/test
shell: bash

- name: Upload code coverage
Expand Down

0 comments on commit de07a2c

Please sign in to comment.