Unify env var names and fix CI
This commit is contained in:
parent
38dde4ed33
commit
5ec66bf56f
@ -1,6 +1,6 @@
|
||||
NODE_ENV=development
|
||||
|
||||
TELEGRAM_T_API_ID=
|
||||
TELEGRAM_T_API_HASH=
|
||||
TELEGRAM_API_ID=
|
||||
TELEGRAM_API_HASH=
|
||||
|
||||
BASE_URL=https://web.telegram.org/a/
|
||||
|
||||
5
.github/workflows/electron-release.yml
vendored
5
.github/workflows/electron-release.yml
vendored
@ -50,8 +50,8 @@ jobs:
|
||||
|
||||
- name: Build and release
|
||||
env:
|
||||
TELEGRAM_T_API_ID: ${{ secrets.TELEGRAM_API_ID }}
|
||||
TELEGRAM_T_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
|
||||
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
|
||||
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
@ -134,6 +134,7 @@ jobs:
|
||||
env:
|
||||
KEYPAIR_ALIAS: ${{ secrets.KEYPAIR_ALIAS }}
|
||||
FILE_PATH: ${{ steps.download-artifact.outputs.download-path }}
|
||||
shell: cmd
|
||||
run: smctl.exe sign --keypair-alias=%KEYPAIR_ALIAS% --input "%FILE_PATH%\%FILE_NAME%"
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
|
||||
@ -81,8 +81,8 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
|
||||
|
||||
client = new TelegramClient(
|
||||
session,
|
||||
process.env.TELEGRAM_T_API_ID,
|
||||
process.env.TELEGRAM_T_API_HASH,
|
||||
process.env.TELEGRAM_API_ID,
|
||||
process.env.TELEGRAM_API_HASH,
|
||||
{
|
||||
deviceModel: navigator.userAgent || userAgent || DEFAULT_USER_AGENT,
|
||||
systemVersion: platform || DEFAULT_PLATFORM,
|
||||
|
||||
@ -231,8 +231,8 @@ async function signInUserWithQrCode(
|
||||
}
|
||||
|
||||
const result = await client.invoke(new Api.auth.ExportLoginToken({
|
||||
apiId: Number(process.env.TELEGRAM_T_API_ID),
|
||||
apiHash: process.env.TELEGRAM_T_API_HASH,
|
||||
apiId: Number(process.env.TELEGRAM_API_ID),
|
||||
apiHash: process.env.TELEGRAM_API_HASH,
|
||||
exceptIds: [],
|
||||
}));
|
||||
if (!(result instanceof Api.auth.LoginToken)) {
|
||||
@ -272,8 +272,8 @@ async function signInUserWithQrCode(
|
||||
|
||||
try {
|
||||
const result2 = await client.invoke(new Api.auth.ExportLoginToken({
|
||||
apiId: Number(process.env.TELEGRAM_T_API_ID),
|
||||
apiHash: process.env.TELEGRAM_T_API_HASH,
|
||||
apiId: Number(process.env.TELEGRAM_API_ID),
|
||||
apiHash: process.env.TELEGRAM_API_HASH,
|
||||
exceptIds: [],
|
||||
}));
|
||||
|
||||
|
||||
@ -214,8 +214,8 @@ export default function createConfig(
|
||||
IS_ELECTRON: false,
|
||||
APP_TITLE,
|
||||
RELEASE_DATETIME: Date.now(),
|
||||
TELEGRAM_T_API_ID: undefined,
|
||||
TELEGRAM_T_API_HASH: undefined,
|
||||
TELEGRAM_API_ID: undefined,
|
||||
TELEGRAM_API_HASH: undefined,
|
||||
// eslint-disable-next-line no-null/no-null
|
||||
TEST_SESSION: null,
|
||||
ELECTRON_HOST_URL,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user