Skip to content

Commit

Permalink
Merge pull request #1750 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Nov 9, 2023
2 parents 027b8a8 + 1230764 commit 7c59a00
Show file tree
Hide file tree
Showing 31 changed files with 164 additions and 66 deletions.
16 changes: 15 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Extensions Build"
name: 'Extensions Build'
on:
push:
branches:
Expand All @@ -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
Expand All @@ -21,15 +25,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18'
cache: "yarn"
cache: 'yarn'

- name: Install Packages
run: |
cd apps/extensions && yarn install --frozen-lockfile
- name: Build and zip extension artifact
run: cd apps/extensions && yarn build -- --zip

#
# - name: Browser Platform Publish
# uses: PlasmoHQ/bpp@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Extensions Build & Publish"
name: 'Extensions Build & Publish'
on:
push:
branches:
Expand All @@ -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
Expand All @@ -21,15 +25,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18'
cache: "yarn"
cache: 'yarn'

- name: Install Packages
run: |
cd apps/extensions && yarn install --frozen-lockfile
- name: Build and zip extension artifact
run: cd apps/extensions && yarn build -- --zip

#
# - name: Browser Platform Publish
# uses: PlasmoHQ/bpp@v2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: Mobile Build Before Merge
on:
pull_request:
types:
- opened
- edited
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/**'
- 'apps/mobile/**'
- 'package.json'
- 'yarn.lock'
- 'README.md'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release.dev.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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 }}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Web Build Before Merge
on:
pull_request:
types:
- opened
- edited
types: [opened, synchronize, reopened]
paths:
- '.deploy/web/**'
- '.github/workflows/**'
Expand All @@ -12,18 +10,28 @@ on:
- 'yarn.lock'
- 'README.md'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest

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: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,7 +26,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '18'
cache: "yarn"
cache: 'yarn'

- name: Install Packages
run: |
Expand All @@ -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: ./

7 changes: 3 additions & 4 deletions apps/web/app/constants.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/components/loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function BackdropLoader({
>
<div>
<Card className="w-[98%] md:min-w-[130px] flex items-center justify-center" shadow="custom">
<div className="flex space-x-4">
<div className="flex space-x-4 items-center">
<div className="w-[31px] h-[31px]">
<SpinnerLoader className="mr-1" />
</div>
Expand Down
12 changes: 10 additions & 2 deletions apps/web/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -45,7 +47,13 @@ const MyApp = ({ Component, pageProps }: AppProps) => {
<JitsuProvider
options={
isJitsuEnvsPresent
? { ...jitsuConfiguration }
? {
host: jitsuConf.host ?? '',
writeKey: jitsuConf.writeKey ?? undefined,
debug: jitsuConf.debug,
cookieDomain: jitsuConf.cookieDomain ?? undefined,
echoEvents: jitsuConf.echoEvents,
}
: {
disabled: true
}
Expand Down
26 changes: 4 additions & 22 deletions apps/web/pages/integration/github.tsx
Original file line number Diff line number Diff line change
@@ -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<boolean>(false);

Expand Down Expand Up @@ -61,28 +64,7 @@ const GitHub = () => {

return (
<div className="flex flex-col p-3">
{/* {!router.query.code && (
<Link
href={url}
className="p-3 mb-5 text-sm text-center text-white bg-primary dark:bg-primary-light rounded-xl w-52"
>
Connect to GitHub
</Link>
)} */}
{/* {router.query.code && (
<p>
<b>Code (This code is used to get Access/Refresh token):</b>{' '}
{router.query.code}
</p>
)}
{router.query.installation_id && (
<p>installation_id: {router.query.installation_id}</p>
)}
{(loadingIntegrationTypes ||
integrationLoading ||
integrationTenantLoading ||
repositoriesLoading) && <>Loading...</>} */}
<BackdropLoader show={true} title={t('common.GITHUB_LOADING_TEXT')} />
</div>
);
};
Expand Down
Loading

0 comments on commit 7c59a00

Please sign in to comment.