From 5ddc3ad2a77697668f8a395307cf0bb82881daf2 Mon Sep 17 00:00:00 2001 From: Badal Khatri <81486442+badalkhatri0924@users.noreply.github.com> Date: Thu, 9 Nov 2023 17:51:50 +0530 Subject: [PATCH 1/4] Fix/GitHub installation loader (#1749) * Updated Github App Installation Loader * fix: Build issue --- apps/web/lib/components/loader.tsx | 2 +- apps/web/pages/integration/github.tsx | 26 ++++---------------------- apps/web/pages/profile/[memberId].tsx | 2 +- apps/web/pages/settings/personal.tsx | 2 +- apps/web/public/locales/ar/common.json | 3 ++- apps/web/public/locales/bg/common.json | 3 ++- apps/web/public/locales/de/common.json | 4 +++- apps/web/public/locales/en/common.json | 4 +++- apps/web/public/locales/es/common.json | 3 ++- apps/web/public/locales/fr/common.json | 3 ++- apps/web/public/locales/he/common.json | 4 +++- apps/web/public/locales/it/common.json | 4 +++- apps/web/public/locales/nl/common.json | 4 +++- apps/web/public/locales/pl/common.json | 4 +++- apps/web/public/locales/pt/common.json | 4 +++- apps/web/public/locales/ru/common.json | 4 +++- apps/web/public/locales/zh/common.json | 4 +++- 17 files changed, 42 insertions(+), 38 deletions(-) diff --git a/apps/web/lib/components/loader.tsx b/apps/web/lib/components/loader.tsx index b7f6ce009..63d1878d1 100644 --- a/apps/web/lib/components/loader.tsx +++ b/apps/web/lib/components/loader.tsx @@ -67,7 +67,7 @@ export function BackdropLoader({ >
-
+
diff --git a/apps/web/pages/integration/github.tsx b/apps/web/pages/integration/github.tsx index bfbe5ef3a..b05ee96d4 100644 --- a/apps/web/pages/integration/github.tsx +++ b/apps/web/pages/integration/github.tsx @@ -1,11 +1,14 @@ import { useIntegrationTenant, useIntegrationTypes } from '@app/hooks'; import { useGitHubIntegration } from '@app/hooks/integrations/useGitHubIntegration'; import { withAuthentication } from 'lib/app/authenticator'; +import { BackdropLoader } from 'lib/components'; +import { useTranslation } from 'react-i18next'; import { useRouter } from 'next/router'; import { useCallback, useEffect, useRef } from 'react'; const GitHub = () => { const router = useRouter(); + const { t } = useTranslation(); const installing = useRef(false); @@ -61,28 +64,7 @@ const GitHub = () => { return (
- {/* {!router.query.code && ( - - Connect to GitHub - - )} */} - {/* {router.query.code && ( -

- Code (This code is used to get Access/Refresh token):{' '} - {router.query.code} -

- )} - {router.query.installation_id && ( -

installation_id: {router.query.installation_id}

- )} - - {(loadingIntegrationTypes || - integrationLoading || - integrationTenantLoading || - repositoriesLoading) && <>Loading...} */} +
); }; diff --git a/apps/web/pages/profile/[memberId].tsx b/apps/web/pages/profile/[memberId].tsx index 2006c4ba2..dc29fad5b 100644 --- a/apps/web/pages/profile/[memberId].tsx +++ b/apps/web/pages/profile/[memberId].tsx @@ -23,7 +23,7 @@ const Profile = () => { const { t } = useTranslation(); const breadcrumb = [ { title: activeTeam?.name || '', href: '/' }, - ...t('pages.profile.BREADCRUMB', { returnObjects: true }) + ...(t('pages.profile.BREADCRUMB', { returnObjects: true }) as any) ]; const profileIsAuthUser = useMemo(() => profile.isAuthUser, [profile.isAuthUser]); diff --git a/apps/web/pages/settings/personal.tsx b/apps/web/pages/settings/personal.tsx index 2e5496943..1a3922663 100644 --- a/apps/web/pages/settings/personal.tsx +++ b/apps/web/pages/settings/personal.tsx @@ -19,7 +19,7 @@ import { useRecoilState } from 'recoil'; const Personal = () => { const { t } = useTranslation(); const [user] = useRecoilState(userState); - const breadcrumb = [...t('pages.settings.BREADCRUMB', { returnObjects: true })]; + const breadcrumb = [...(t('pages.settings.BREADCRUMB', { returnObjects: true }) as any)]; return ( <> diff --git a/apps/web/public/locales/ar/common.json b/apps/web/public/locales/ar/common.json index f89afdad2..518843372 100644 --- a/apps/web/public/locales/ar/common.json +++ b/apps/web/public/locales/ar/common.json @@ -166,7 +166,8 @@ "FILTER_HISTORY": "التاريخ", "FILTER_UNSUBSCRIBE": "إلغاء الاشتراك", - "KEYBOARD_SHORTCUTS": "اختصارات لوحة المفاتيح" + "KEYBOARD_SHORTCUTS": "اختصارات لوحة المفاتيح", + "GITHUB_LOADING_TEXT": "نحن الآن في عملية تثبيت التكامل الخاص بك على GitHub، توكّل." }, "alerts": { "ALERT_DELETE_ACCOUNT": "سيتم إزالة الحساب من جميع الفرق، باستثناء حيث أنت المدير فقط", diff --git a/apps/web/public/locales/bg/common.json b/apps/web/public/locales/bg/common.json index 35cbd8ebe..f7e0fd44e 100644 --- a/apps/web/public/locales/bg/common.json +++ b/apps/web/public/locales/bg/common.json @@ -164,7 +164,8 @@ "FILTER_HISTORY": "История", "FILTER_UNSUBSCRIBE": "Отпиши се", - "KEYBOARD_SHORTCUTS": "Клавишни комбинации" + "KEYBOARD_SHORTCUTS": "Клавишни комбинации", + "GITHUB_LOADING_TEXT": "В момента инсталираме вашия GitHub интеграция, изчакайте..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Профилът ще бъде премахнат от всички отбори, освен където сте само мениджър", diff --git a/apps/web/public/locales/de/common.json b/apps/web/public/locales/de/common.json index 05697e933..0c53656cb 100644 --- a/apps/web/public/locales/de/common.json +++ b/apps/web/public/locales/de/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "Historie", "FILTER_UNSUBSCRIBE": "Abmelden", - "KEYBOARD_SHORTCUTS": "Tastenkombinationen" + "KEYBOARD_SHORTCUTS": "Tastenkombinationen", + + "GITHUB_LOADING_TEXT": "Wir installieren jetzt Ihre GitHub-Integration, warten Sie..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Das Konto wird von allen Teams entfernt, außer wo Sie nur Manager sind", diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json index 657f3e9ea..5fdb810b1 100644 --- a/apps/web/public/locales/en/common.json +++ b/apps/web/public/locales/en/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "History", "FILTER_UNSUBSCRIBE": "Unsubscribe", - "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts" + "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", + + "GITHUB_LOADING_TEXT": "We are now installing your GitHub Integration, hold on..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account will be removed from all teams, except where you are only the manager", diff --git a/apps/web/public/locales/es/common.json b/apps/web/public/locales/es/common.json index 50eedaa10..c5084d37f 100644 --- a/apps/web/public/locales/es/common.json +++ b/apps/web/public/locales/es/common.json @@ -162,7 +162,8 @@ "FILTER_COMMENTS": "Comentarios", "FILTER_HISTORY": "Historial", "FILTER_UNSUBSCRIBE": "Darse de baja", - "KEYBOARD_SHORTCUTS": "Atajos de teclado" + "KEYBOARD_SHORTCUTS": "Atajos de teclado", + "GITHUB_LOADING_TEXT": "Estamos instalando su integración de GitHub, espere..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "La cuenta será eliminada de todos los equipos, excepto donde eres sólo el administrador", diff --git a/apps/web/public/locales/fr/common.json b/apps/web/public/locales/fr/common.json index 863e2384c..11501f05f 100644 --- a/apps/web/public/locales/fr/common.json +++ b/apps/web/public/locales/fr/common.json @@ -164,7 +164,8 @@ "FILTER_HISTORY": "Historique", "FILTER_UNSUBSCRIBE": "Se désabonner", - "KEYBOARD_SHORTCUTS": "Raccourcis clavier" + "KEYBOARD_SHORTCUTS": "Raccourcis clavier", + "GITHUB_LOADING_TEXT": "Nous installons actuellement votre intégration GitHub, veuillez patienter..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Le compte sera supprimé de toutes les équipes, sauf si vous êtes uniquement le gestionnaire", diff --git a/apps/web/public/locales/he/common.json b/apps/web/public/locales/he/common.json index 62e81f413..b3d59d1e4 100644 --- a/apps/web/public/locales/he/common.json +++ b/apps/web/public/locales/he/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "היסטוריה", "FILTER_UNSUBSCRIBE": "בטל מנוי", - "KEYBOARD_SHORTCUTS": "קיצורי מקלדת" + "KEYBOARD_SHORTCUTS": "קיצורי מקלדת", + + "GITHUB_LOADING_TEXT": "אנו מתקינים כעת את אינטגרציית ה-GitHub שלך, המתינו." }, "alerts": { "ALERT_DELETE_ACCOUNT": "החשבון יוסר מכל הצוותים, למעט היכן שאתה רק המנהל", diff --git a/apps/web/public/locales/it/common.json b/apps/web/public/locales/it/common.json index ab85e8032..6a8a35e74 100644 --- a/apps/web/public/locales/it/common.json +++ b/apps/web/public/locales/it/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "History", "FILTER_UNSUBSCRIBE": "Unsubscribe", - "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts" + "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", + + "GITHUB_LOADING_TEXT": "Stiamo installando la tua integrazione GitHub, attendi..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account will be removed from all teams, except where you are only the manager", diff --git a/apps/web/public/locales/nl/common.json b/apps/web/public/locales/nl/common.json index cc5ce7e19..060c428d2 100644 --- a/apps/web/public/locales/nl/common.json +++ b/apps/web/public/locales/nl/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "Geschiedenis", "FILTER_UNSUBSCRIBE": "Afmelden", - "KEYBOARD_SHORTCUTS": "Sneltoetsen" + "KEYBOARD_SHORTCUTS": "Sneltoetsen", + + "GITHUB_LOADING_TEXT": "We zijn nu uw GitHub-integratie aan het installeren, even geduld..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account wordt verwijderd van alle teams, behalve waar u alleen manager bent", diff --git a/apps/web/public/locales/pl/common.json b/apps/web/public/locales/pl/common.json index ab85e8032..864014292 100644 --- a/apps/web/public/locales/pl/common.json +++ b/apps/web/public/locales/pl/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "History", "FILTER_UNSUBSCRIBE": "Unsubscribe", - "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts" + "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", + + "GITHUB_LOADING_TEXT": "Aktualnie instalujemy integrację GitHub, proszę czekać..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account will be removed from all teams, except where you are only the manager", diff --git a/apps/web/public/locales/pt/common.json b/apps/web/public/locales/pt/common.json index ab85e8032..590dacb3b 100644 --- a/apps/web/public/locales/pt/common.json +++ b/apps/web/public/locales/pt/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "History", "FILTER_UNSUBSCRIBE": "Unsubscribe", - "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts" + "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", + + "GITHUB_LOADING_TEXT": "Estamos agora a instalar a sua integração do GitHub, aguarde..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account will be removed from all teams, except where you are only the manager", diff --git a/apps/web/public/locales/ru/common.json b/apps/web/public/locales/ru/common.json index ab85e8032..75993d5f1 100644 --- a/apps/web/public/locales/ru/common.json +++ b/apps/web/public/locales/ru/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "History", "FILTER_UNSUBSCRIBE": "Unsubscribe", - "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts" + "KEYBOARD_SHORTCUTS": "Keyboard Shortcuts", + + "GITHUB_LOADING_TEXT": "Мы сейчас устанавливаем вашу интеграцию GitHub, подождите..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "Account will be removed from all teams, except where you are only the manager", diff --git a/apps/web/public/locales/zh/common.json b/apps/web/public/locales/zh/common.json index d04259013..cbb774930 100644 --- a/apps/web/public/locales/zh/common.json +++ b/apps/web/public/locales/zh/common.json @@ -165,7 +165,9 @@ "FILTER_HISTORY": "历史", "FILTER_UNSUBSCRIBE": "取消订阅", - "KEYBOARD_SHORTCUTS": "快捷键" + "KEYBOARD_SHORTCUTS": "快捷键", + + "GITHUB_LOADING_TEXT": "我们正在安装您的 GitHub 集成,请稍等..." }, "alerts": { "ALERT_DELETE_ACCOUNT": "账户将从所有团队中移除,您作为管理员的团队除外", From 7b19cc753ddd618bc25e6eec17e2691659bfc417 Mon Sep 17 00:00:00 2001 From: Ruslan Konviser Date: Thu, 9 Nov 2023 13:32:36 +0100 Subject: [PATCH 2/4] fix: Jitsu --- apps/web/app/constants.ts | 7 +++---- apps/web/pages/_app.tsx | 12 ++++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/web/app/constants.ts b/apps/web/app/constants.ts index cfec8f98e..628192e71 100644 --- a/apps/web/app/constants.ts +++ b/apps/web/app/constants.ts @@ -1,4 +1,4 @@ -import { ExtendedJitsuOptions } from '@jitsu/jitsu-react/dist/useJitsu'; +import { JitsuOptions } from '@jitsu/jitsu-react/dist/useJitsu'; import { I_SMTPRequest } from './interfaces/ISmtp'; export const API_BASE_URL = '/api'; @@ -77,15 +77,14 @@ export const BOARD_BACKEND_POST_URL = process.env.NEXT_PUBLIC_BOARD_BACKEND_POST export const BOARD_FIREBASE_CONFIG = process.env.NEXT_PUBLIC_BOARD_FIREBASE_CONFIG; // Jitsu -export const jitsuConfiguration: ExtendedJitsuOptions = { +export const jitsuConfiguration: () => JitsuOptions = () => ({ host: process.env.NEXT_JITSU_BROWSER_URL || '', writeKey: process.env.NEXT_JITSU_BROWSER_WRITE_KEY || '', - disabled: false, // if enabled - events will be sent to the console but no data sent to Jitsu. // Strange this is not mentioned in the documentation https://github.com/jitsucom/jitsu/blob/35c4ecaff54d61a87853381cb17262b7bfbd4a6e/libs/jitsu-js/src/jitsu.ts#L40 echoEvents: false, debug: false -}; +}); // Github Integration export const GITHUB_APP_NAME = process.env.NEXT_PUBLIC_GITHUB_APP_NAME || 'ever-github'; diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx index e72c1fb28..243cf71a0 100644 --- a/apps/web/pages/_app.tsx +++ b/apps/web/pages/_app.tsx @@ -17,7 +17,9 @@ import { JitsuAnalytics } from '../lib/components/services/jitsu-analytics'; import i18n from '../ni18n.config'; const MyApp = ({ Component, pageProps }: AppProps) => { - const isJitsuEnvsPresent = jitsuConfiguration.host && jitsuConfiguration.writeKey; + const jitsuConf = jitsuConfiguration(); + console.log(`Jitsu Configuration: ${JSON.stringify(jitsuConf)}`); + const isJitsuEnvsPresent: boolean = jitsuConf.host !== '' && jitsuConf.writeKey !== ''; console.log(`Jitsu Enabled: ${isJitsuEnvsPresent}`); return ( @@ -45,7 +47,13 @@ const MyApp = ({ Component, pageProps }: AppProps) => { Date: Thu, 9 Nov 2023 13:32:50 +0100 Subject: [PATCH 3/4] chore: actions --- .../{desktop-prod.yml => desktop.prod.yml} | 0 ...{extensions-dev.yml => extensions.dev.yml} | 9 +++-- ...xtensions-prod.yml => extensions.prod.yml} | 9 +++-- ...fore-merge.yml => mobile.before-merge.yml} | 14 ++++++-- .../{mobile-dev.yml => mobile.dev.yml} | 4 +++ .../{mobile-prod.yml => mobile.prod.yml} | 14 +++++--- .github/workflows/release.dev.yml | 36 +++++++++++++++++++ .../{release-prod.yml => release.prod.yml} | 0 ...-before-merge.yml => web.before-merge.yml} | 16 ++++++--- .../workflows/{web-dev.yml => web.dev.yml} | 4 +++ .../workflows/{web-prod.yml => web.prod.yml} | 9 +++-- 11 files changed, 94 insertions(+), 21 deletions(-) rename .github/workflows/{desktop-prod.yml => desktop.prod.yml} (100%) rename .github/workflows/{extensions-dev.yml => extensions.dev.yml} (85%) rename .github/workflows/{extensions-prod.yml => extensions.prod.yml} (84%) rename .github/workflows/{mobile-dev-before-merge.yml => mobile.before-merge.yml} (73%) rename .github/workflows/{mobile-dev.yml => mobile.dev.yml} (92%) rename .github/workflows/{mobile-prod.yml => mobile.prod.yml} (89%) create mode 100644 .github/workflows/release.dev.yml rename .github/workflows/{release-prod.yml => release.prod.yml} (100%) rename .github/workflows/{web-dev-before-merge.yml => web.before-merge.yml} (56%) rename .github/workflows/{web-dev.yml => web.dev.yml} (92%) rename .github/workflows/{web-prod.yml => web.prod.yml} (84%) diff --git a/.github/workflows/desktop-prod.yml b/.github/workflows/desktop.prod.yml similarity index 100% rename from .github/workflows/desktop-prod.yml rename to .github/workflows/desktop.prod.yml diff --git a/.github/workflows/extensions-dev.yml b/.github/workflows/extensions.dev.yml similarity index 85% rename from .github/workflows/extensions-dev.yml rename to .github/workflows/extensions.dev.yml index 2c1eb984b..3de909423 100644 --- a/.github/workflows/extensions-dev.yml +++ b/.github/workflows/extensions.dev.yml @@ -1,4 +1,4 @@ -name: "Extensions Build" +name: 'Extensions Build' on: push: branches: @@ -11,6 +11,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -21,7 +25,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' - cache: "yarn" + cache: 'yarn' - name: Install Packages run: | @@ -29,7 +33,6 @@ jobs: - name: Build and zip extension artifact run: cd apps/extensions && yarn build -- --zip - # # - name: Browser Platform Publish # uses: PlasmoHQ/bpp@v2 diff --git a/.github/workflows/extensions-prod.yml b/.github/workflows/extensions.prod.yml similarity index 84% rename from .github/workflows/extensions-prod.yml rename to .github/workflows/extensions.prod.yml index 0921be233..810db2551 100644 --- a/.github/workflows/extensions-prod.yml +++ b/.github/workflows/extensions.prod.yml @@ -1,4 +1,4 @@ -name: "Extensions Build & Publish" +name: 'Extensions Build & Publish' on: push: branches: @@ -11,6 +11,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: build: runs-on: ubuntu-latest @@ -21,7 +25,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' - cache: "yarn" + cache: 'yarn' - name: Install Packages run: | @@ -29,7 +33,6 @@ jobs: - name: Build and zip extension artifact run: cd apps/extensions && yarn build -- --zip - # # - name: Browser Platform Publish # uses: PlasmoHQ/bpp@v2 diff --git a/.github/workflows/mobile-dev-before-merge.yml b/.github/workflows/mobile.before-merge.yml similarity index 73% rename from .github/workflows/mobile-dev-before-merge.yml rename to .github/workflows/mobile.before-merge.yml index 1d7b3929a..fa8cebf71 100644 --- a/.github/workflows/mobile-dev-before-merge.yml +++ b/.github/workflows/mobile.before-merge.yml @@ -1,9 +1,7 @@ name: Mobile Build Before Merge on: pull_request: - types: - - opened - - edited + types: [opened, synchronize, reopened] paths: - '.github/workflows/**' - 'apps/mobile/**' @@ -11,6 +9,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest @@ -29,6 +31,12 @@ jobs: - uses: actions/checkout@v3 + - name: Cancel workflow if PR is from develop to main + if: github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' + run: | + echo "PR is from develop to main. Cancelling the workflow." + exit 78 + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: diff --git a/.github/workflows/mobile-dev.yml b/.github/workflows/mobile.dev.yml similarity index 92% rename from .github/workflows/mobile-dev.yml rename to .github/workflows/mobile.dev.yml index df7e46fa0..8b5f0a4f6 100644 --- a/.github/workflows/mobile-dev.yml +++ b/.github/workflows/mobile.dev.yml @@ -10,6 +10,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/mobile-prod.yml b/.github/workflows/mobile.prod.yml similarity index 89% rename from .github/workflows/mobile-prod.yml rename to .github/workflows/mobile.prod.yml index 6cccf1b15..bd1dc0109 100644 --- a/.github/workflows/mobile-prod.yml +++ b/.github/workflows/mobile.prod.yml @@ -10,6 +10,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest @@ -67,16 +71,16 @@ jobs: # See https://github.com/ever-co/ever-teams-boards-store/blob/develop/.github/workflows/deploy.yml - - name: "Authenticate to Google Cloud" - uses: "google-github-actions/auth@v1" + - name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1' with: credentials_json: ${{ env.DECODED_GOOGLE_CREDENTIALS }} # Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`. - - name: "Set up Cloud SDK" - uses: "google-github-actions/setup-gcloud@v1" + - name: 'Set up Cloud SDK' + uses: 'google-github-actions/setup-gcloud@v1' with: - project_id: "ever-teams-399720" + project_id: 'ever-teams-399720' - name: Upload to Play Store Console run: cd apps/mobile && eas submit --platform android --latest --non-interactive diff --git a/.github/workflows/release.dev.yml b/.github/workflows/release.dev.yml new file mode 100644 index 000000000..0108e347f --- /dev/null +++ b/.github/workflows/release.dev.yml @@ -0,0 +1,36 @@ +name: Release Prod + +on: + push: + branches: [develop] + +jobs: + release: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + + steps: + - name: Check out Git repository + uses: actions/checkout@v3 + + - name: Bump version and push tag + uses: mathieudutour/github-tag-action@v6.1 + id: tag_version + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + release_branches: master,main,develop,stage + pre_release_branches: something_to_possible_use_later + + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + generateReleaseNotes: true + prerelease: true + token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.tag_version.outputs.new_tag }} + name: ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} diff --git a/.github/workflows/release-prod.yml b/.github/workflows/release.prod.yml similarity index 100% rename from .github/workflows/release-prod.yml rename to .github/workflows/release.prod.yml diff --git a/.github/workflows/web-dev-before-merge.yml b/.github/workflows/web.before-merge.yml similarity index 56% rename from .github/workflows/web-dev-before-merge.yml rename to .github/workflows/web.before-merge.yml index 1532dd487..6cd13dd1d 100644 --- a/.github/workflows/web-dev-before-merge.yml +++ b/.github/workflows/web.before-merge.yml @@ -1,9 +1,7 @@ name: Web Build Before Merge on: pull_request: - types: - - opened - - edited + types: [opened, synchronize, reopened] paths: - '.deploy/web/**' - '.github/workflows/**' @@ -12,6 +10,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest @@ -19,11 +21,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cancel workflow if PR is from develop to main + if: github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main' + run: | + echo "PR is from develop to main. Cancelling the workflow." + exit 78 + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: node-version: '18' - cache: "yarn" + cache: 'yarn' - name: Install Packages run: | diff --git a/.github/workflows/web-dev.yml b/.github/workflows/web.dev.yml similarity index 92% rename from .github/workflows/web-dev.yml rename to .github/workflows/web.dev.yml index 176ce0765..3a2f7a7d3 100644 --- a/.github/workflows/web-dev.yml +++ b/.github/workflows/web.dev.yml @@ -11,6 +11,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/web-prod.yml b/.github/workflows/web.prod.yml similarity index 84% rename from .github/workflows/web-prod.yml rename to .github/workflows/web.prod.yml index cf181399b..2fc31dfde 100644 --- a/.github/workflows/web-prod.yml +++ b/.github/workflows/web.prod.yml @@ -11,6 +11,10 @@ on: - 'yarn.lock' - 'README.md' +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + jobs: deploy: runs-on: ubuntu-latest @@ -22,7 +26,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '18' - cache: "yarn" + cache: 'yarn' - name: Install Packages run: | @@ -39,7 +43,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional GITHUB_DEPLOYMENT_ENV: Production PRODUCTION: true - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID}} #Required + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID}} #Required VERCEL_PROJECT_ID: ${{ secrets.VERCEL_WEB_PROJECT_ID}} #Required WORKING_DIRECTORY: ./ - From 1230764994ef49c1a69cc41e3c99a61e4fc151b3 Mon Sep 17 00:00:00 2001 From: Ruslan Konviser Date: Thu, 9 Nov 2023 13:35:57 +0100 Subject: [PATCH 4/4] chore: spell --- .cspell.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index cd7d666ff..f272532ce 100644 --- a/.cspell.json +++ b/.cspell.json @@ -22,7 +22,21 @@ "svgs", "tailwindcss", "Timesheet", - "Vercel" + "Vercel", + "buildjet", + "vcpu", + "libappindicator", + "binutils", + "icnsutils", + "graphicsmagick", + "setuptools", + "gcloud", + "mathieudutour", + "ncipollo", + "Huhn", + "appdev", + "Chatwoot", + "gtag" ], "useGitignore": true, "ignorePaths": [