Skip to content

Commit

Permalink
Revert Bash script for now
Browse files Browse the repository at this point in the history
This reverts commit 6b21d89.
  • Loading branch information
EricKotato committed May 14, 2020
1 parent ff0f57e commit e4f25cc
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 38 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/appimage-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -499,26 +499,36 @@ jobs:
if: >
github.event.client_payload.options.update
&& github.event.client_payload.options.packer
shell: python3 {0}
run: |
cd $REPO_NAME/..
mkdir DesktopPrivate
cd DesktopPrivate
import os
p = os.environ["REPO_NAME"]+"/../DesktopPrivate"
os.mkdir(p)
os.chdir(p)
echo "
const char *PrivateKey = \"\\
-----BEGIN RSA PRIVATE KEY-----\\n\\
keys_contents = r"""
const char *PrivateKey = "\
-----BEGIN RSA PRIVATE KEY-----\n\
${{ secrets.PACKER_PRIVATE_KEY }}
-----END RSA PRIVATE KEY-----\\
\";
-----END RSA PRIVATE KEY-----\
";
const char *PrivateBetaKey = \"\\
-----BEGIN RSA PRIVATE KEY-----\\n\\
const char *PrivateBetaKey = "\
-----BEGIN RSA PRIVATE KEY-----\n\
${{ secrets.PACKER_PRIVATE_BETA_KEY }}
-----END RSA PRIVATE KEY-----\\
\";
" > packer_private.h
-----END RSA PRIVATE KEY-----\
";
"""
echo "\nconst char *AlphaPrivateKey = \"\";\n" > alpha_private.h
alpha_contents = r"""
const char *AlphaPrivateKey = "";
"""
with open("packer_private.h", "w", encoding="utf-8") as f:
f.write(keys_contents)
with open("alpha_private.h", "w", encoding="utf-8") as f:
f.write(alpha_contents)
- name: Kotatogram Desktop build.
if: env.ONLY_CACHE == 'false'
Expand Down
57 changes: 33 additions & 24 deletions .github/workflows/win-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,32 +251,49 @@ jobs:
cd ..
rmdir /S /Q qt_%QT%
- name: Setup Python 3.x
if: >
github.event.client_payload.options.update
&& github.event.client_payload.options.packer
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Setting up updater keys.
if: >
github.event.client_payload.options.update
&& github.event.client_payload.options.packer
shell: bash
shell: python
run: |
cd $REPO_NAME/..
mkdir DesktopPrivate
cd DesktopPrivate
echo "
const char *PrivateKey = \"\\
-----BEGIN RSA PRIVATE KEY-----\\n\\
import os
p = os.environ["REPO_NAME"]+"/../DesktopPrivate"
os.mkdir(p)
os.chdir(p)
keys_contents = r"""
const char *PrivateKey = "\
-----BEGIN RSA PRIVATE KEY-----\n\
${{ secrets.PACKER_PRIVATE_KEY }}
-----END RSA PRIVATE KEY-----\\
\";
-----END RSA PRIVATE KEY-----\
";
const char *PrivateBetaKey = \"\\
-----BEGIN RSA PRIVATE KEY-----\\n\\
const char *PrivateBetaKey = "\
-----BEGIN RSA PRIVATE KEY-----\n\
${{ secrets.PACKER_PRIVATE_BETA_KEY }}
-----END RSA PRIVATE KEY-----\\
\";
" > packer_private.h
-----END RSA PRIVATE KEY-----\
";
"""
echo "\nconst char *AlphaPrivateKey = \"\";\n" > alpha_private.h
alpha_contents = r"""
const char *AlphaPrivateKey = "";
"""
with open("packer_private.h", "w", encoding="utf-8") as f:
f.write(keys_contents)
with open("alpha_private.h", "w", encoding="utf-8") as f:
f.write(alpha_contents)
- name: Kotatogram Desktop build.
if: env.ONLY_CACHE == 'false'
Expand Down Expand Up @@ -343,14 +360,6 @@ jobs:
asset_path: ./${{ env.REPO_NAME }}/artifact/${{ env.ARTIFACT_NAME }}
asset_name: ${{ env.ARTIFACT_NAME }}
asset_content_type: application/octet-stream

- name: Setup Python 3.x
if: >
env.ONLY_CACHE == 'false'
&& github.event.client_payload.options.telegram
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies for Telegram uploader.
if: >
Expand Down

0 comments on commit e4f25cc

Please sign in to comment.