Skip to content

Commit

Permalink
Remove etk before packaging an installer
Browse files Browse the repository at this point in the history
  • Loading branch information
zmbq committed Aug 11, 2020
1 parent 35e82f1 commit 0dfea44
Showing 1 changed file with 132 additions and 0 deletions.
132 changes: 132 additions & 0 deletions .github/workflows/create-executables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Create Standalone Executables
on:
push:
tags:
- v*

jobs:
windows:
name: Create the Windows Executable
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup Node
uses: actions/setup-node@v2-beta
- name: Set backend environment
run: |
cd $env:GITHUB_WORKSPACE/backend
pip install -r requirements.txt --extra-index-url https://pypi.fury.io/theresearchsoftwarecompany
pip uninstall -y etk # Uses langdetect which causes issues with pyinstaller
pip install pyinstaller pywin32
- name: Create executable
env: # Replace unicode characters with ?
PYTHONIOENCODING: :replace
PYTHONLEGACYWINDOWSIOENCODING: true
CI: false # Otherwise React stops on warnings
run: |
cd $env:GITHUB_WORKSPACE/backend
python packaging/prepare_installation.py --version ${{ github.ref }}
- name: Upload to Release
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backend/dist/t2wml-server.exe
asset_name: t2wml-server.windows.exe
tag: ${{ github.ref }}
overwrite: true
body: "Windows Executable"
mac:
name: Create the Mac OS Executable
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup Node
uses: actions/setup-node@v2-beta
- name: Install Code signing certificate
env:
# Note - this is a dummy certificate for development purposes.
# It will be replace by a proper $ {{ secrets.MACOS_CERTIFICATE }}
# when we're finished with this workflow.
CERTIFICATE: MIIJdQIBAzCCCTwGCSqGSIb3DQEHAaCCCS0EggkpMIIJJTCCA7cGCSqGSIb3DQEHBqCCA6gwggOkAgEAMIIDnQYJKoZIhvcNAQcB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q5AxXk4V7WTrolRKljbbVFlOJKn6zqt+s4UF0PVXjl1WGx6K64Mgbg0+acH2S+TnN+0DD9Gb8/3CWR/HjOG64u5rhXKgjpOx+HrUgZuQOnn0kVsrmRY35V+PPBQ5l42sn1b/n8X2yWZLIR6D2EHdeU48M55A03n1CM+xfsSHAKdzh7Eb/wTQrJ5yKEX+zSHb8fYgAsOh06lX2jrLSc2RZNQt3ycLEYWROrxYvSy9A6JypFDuLp8Zm26UP/wSkKCj9mCXnjAiR2TkLckTCroFGCBz8QxDlGIJo63bhlt0ukJgFr/rARK5cunss8eIKVnZuqmrvuK2vW9ZewsATEAsnypX5yXSNkKgpTzFmW5SLYJIDwvhhzYIxhXYPB2WGcP2J9WRQhiRtRe92vsAXK/WFHjENnCTBNZnNXUavk4XWTSE6LkrFiP+wKKffRxcZTRKTZg5NdwZMpRWM8xtFol5iw8TqKb4U0+cCiR7lKlDHnbW7svvJTeijrdSXNxjAzwHkr+wA1W4cIA0etu9UhXcVKw8Vn2vJE3+TKwtinVhLzJkJLd4cdohYy7BH3XB7BcIiDpSlEEZunMdzH0QY1G8rGhiGda1egP3p2+lVUbyh/h13iaLcOejTrXO0VFb4YRQ5y5sK00GsfBfDZGi1hsDbo4LIQoyOHdePIxk0in45M3346hcaKGZDf7H7yGalmpLXAIBDljWJWxYxapv+FI/DbfZg+JBs/x528sY1lGSG/L+pHrSPvX20IUIVCA0mxGiy/hCN7MEqocFPR/6UYTFjmAEGFOzrt45oX62dCO67Q64rfDFKMCMGCSqGSIb3DQEJFDEWHhQAVABlAHMAdAAgAHQAMgB3AG0AbDAjBgkqhkiG9w0BCRUxFgQU/qiMvXRI3JcPqnQtMq0aKOKSafIwMDAhMAkGBSsOAwIaBQAEFBcq++icZdC4kek0wrqp9sTFI3mbBAjz8Di32jIXigIBAQ==
run: |
echo $CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p 12345 build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p 12345 build.keychain
security set-keychain-settings -lut 3600
security import certificate.p12 -k build.keychain -P 12345 -T /usr/bin/codesign -A
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k 12345 build.keychain
- name: Set backend environment
run: |
cd $GITHUB_WORKSPACE/backend
pip install --upgrade setuptools
pip install -r requirements.txt --extra-index-url https://pypi.fury.io/theresearchsoftwarecompany
pip uninstall -y etk # Uses langdetect which causes issues with pyinstaller
pip install pyinstaller
- name: Create executable
env:
CI: false # Otherwise React stops on warnings
run: |
cd $GITHUB_WORKSPACE/backend
python packaging/prepare_installation.py --version ${{ github.ref }}
- name: Sign Executable
run: |
codesign --deep --verbose --force --sign "Test t2wml" $GITHUB_WORKSPACE/backend/dist/t2wml-server
- name: Upload to Release
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backend/dist/t2wml-server
asset_name: t2wml-server.macos
tag: ${{ github.ref }}
overwrite: true
body: "MacOS Executable"
linux:
name: Create the Linux Executable
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Setup Node
uses: actions/setup-node@v2-beta
- name: Set backend environment
run: |
cd $GITHUB_WORKSPACE/backend
pip install --upgrade setuptools
pip install -r requirements.txt --extra-index-url https://pypi.fury.io/theresearchsoftwarecompany
pip uninstall -y etk # Uses langdetect which causes issues with pyinstaller
pip install pyinstaller
- name: Create executable
env:
CI: false # Otherwise React stops on warnings
run: |
cd $GITHUB_WORKSPACE/backend
python packaging/prepare_installation.py --version ${{ github.ref }}
- name: Upload to Release
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: backend/dist/t2wml-server
asset_name: t2wml-server.linux
tag: ${{ github.ref }}
overwrite: true
body: "Linux Executable"

0 comments on commit 0dfea44

Please sign in to comment.