Skip to content

Commit

Permalink
chore: Small changes
Browse files Browse the repository at this point in the history
* Update README
* use actions/setup-python for Windows as well
* Remove unnecessary end of options for yarn commands
* Use custom upload-artifact to fix uploading macOS builds without needing to double ZIP artifacts to preserve symlinks (actions/upload-artifact#93)

Signed-off-by: eXhumer <exhumer@exhumer.cc>
  • Loading branch information
eXhumer committed Aug 22, 2024
1 parent 102eb66 commit 7d909ac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
python-version: ${{ matrix.image.python }}
check-latest: true
if: ${{ runner.os == 'macOS' }}
if: ${{ runner.os != 'Linux' }}

- name: Install Python dependencies
run: python3 -m pip install setuptools
Expand All @@ -68,7 +68,7 @@ jobs:
security unlock-keychain -p "$CI_KEYCHAIN_PASSWORD" build.keychain
security import Certificates.p12 -k build.keychain -P "$CODESIGN_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$CI_KEYCHAIN_PASSWORD" build.keychain
yarn run make -- --platform darwin --arch ${{ matrix.image.arch }}
yarn run make --platform darwin --arch ${{ matrix.image.arch }}
- name: Build package
if: ${{ runner.os != 'macOS' }}
Expand All @@ -78,9 +78,9 @@ jobs:
CASTLABS_EVS_PASSWORD: ${{ secrets.CASTLABS_EVS_PASSWORD }}
run: |
if [ "${{ runner.os }}" = "Linux" ]; then
yarn run package -- --platform linux --arch ${{ matrix.image.arch }}
yarn run package --platform linux --arch ${{ matrix.image.arch }}
else
yarn run package -- --platform win32 --arch ${{ matrix.image.arch }}
yarn run package --platform win32 --arch ${{ matrix.image.arch }}
fi
- name: Upload package (Windows)
Expand Down Expand Up @@ -112,9 +112,10 @@ jobs:

- name: Upload package (macOS / ZIP)
if: ${{ runner.os == 'macOS' }}
uses: actions/upload-artifact@v4
uses: eXhumer/upload-artifact@v4
with:
name: eXViewer-darwin-${{ matrix.image.arch }}
path: out/make/zip/darwin/${{ matrix.image.arch }}/*
path: out/${{ matrix.image.arch }}/
follow-symlinks: false
if-no-files-found: error
compression-level: 9
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,26 @@

**This app is unofficial and is not associated in any way with the Formula 1 companies. F1, FORMULA ONE, FORMULA 1, FIA FORMULA ONE WORLD CHAMPIONSHIP, GRAND PRIX and related marks are trade marks of Formula One Licensing BV.**

## Packaging notes
* A [`postPackage`](https://www.electronforge.io/config/hooks#postpackage) hook has been added for macOS/win32 packages to be [VMP signed](https://github.com/castlabs/electron-releases/wiki/VMP) with [castlabs-evs](https://pypi.org/project/castlabs-evs/). `CASTLABS_EVS_USERNAME` & `CASTLABS_EVS_PASSWORD` are required as a result when trying to build the macOS/win32 packages and the `python` command must be available during packaging. For macOS builds, codesign build with custom entitlements as necessary and then notarize it with `APPLE_ID`, `APPLE_ID_PASSWORD` & `APPLE_TEAM_ID`.

## Acknowledgements
* [CastLabs' Electron](https://github.com/castlabs/electron-releases) which allows Widevine protected stream playback.
* [robvdpol's RaceControl](https://github.com/robvdpol/RaceControl) which provided an open-source desktop client for F1TV content streaming before F1TV used Widevine DRM.

## License

This package is licensed under the AGPL-3.0-only License. See the [LICENSE](LICENSE.md) file for more information.

<details>

<summary>Build informations</summary>

## Packaging notes
* A [`postPackage`](https://www.electronforge.io/config/hooks#postpackage) hook has been added for macOS/win32 packages to be [VMP signed](https://github.com/castlabs/electron-releases/wiki/VMP) with [castlabs-evs](https://pypi.org/project/castlabs-evs/). `CASTLABS_EVS_USERNAME` & `CASTLABS_EVS_PASSWORD` are required as a result when trying to build the macOS/win32 packages and the `python` command must be available during packaging. For macOS builds, codesign build with custom entitlements as necessary and then notarize it with `APPLE_ID`, `APPLE_ID_PASSWORD` & `APPLE_TEAM_ID`.

## Dependency version notes
Some dependencies are locked to specific versions due to compatibility issues caused due to the newer versions.

* [`eslint` is locked to `^8.57.0` due to `eslint-plugin-import` not being available for major version 9 yet.](https://github.com/import-js/eslint-plugin-import/pull/2996).
* `@vercel/webpack-asset-relocator-loader` is locked to [`1.7.3` due to Electron Forge](https://github.com/electron/forge/issues/3600)
* `sass` is locked to [`1.77.6` due to breaking changes with mixed declarations](https://sass-lang.com/documentation/breaking-changes/mixed-decls/). `1.77.7` & above shows warning regarding this while launched in development mode due to loading SCSS from packages `bootstrap` & the player skin.

## License

This package is licensed under the AGPL-3.0-only License. See the [LICENSE](LICENSE.md) file for more information.
</details>

0 comments on commit 7d909ac

Please sign in to comment.