@codyswann/lisa 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +867 -0
- package/all/copy-overwrite/.claude/README.md +205 -0
- package/all/copy-overwrite/.claude/agents/agent-architect.md +311 -0
- package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +146 -0
- package/all/copy-overwrite/.claude/agents/codebase-locator.md +125 -0
- package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +237 -0
- package/all/copy-overwrite/.claude/agents/git-history-analyzer.md +183 -0
- package/all/copy-overwrite/.claude/agents/hooks-expert.md +74 -0
- package/all/copy-overwrite/.claude/agents/skill-evaluator.md +246 -0
- package/all/copy-overwrite/.claude/agents/slash-command-architect.md +87 -0
- package/all/copy-overwrite/.claude/agents/web-search-researcher.md +112 -0
- package/all/copy-overwrite/.claude/commands/git/commit-and-submit-pr.md +8 -0
- package/all/copy-overwrite/.claude/commands/git/commit.md +44 -0
- package/all/copy-overwrite/.claude/commands/git/prune.md +34 -0
- package/all/copy-overwrite/.claude/commands/git/submit-pr.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/create.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/verify.md +34 -0
- package/all/copy-overwrite/.claude/commands/project/archive.md +8 -0
- package/all/copy-overwrite/.claude/commands/project/bootstrap.md +49 -0
- package/all/copy-overwrite/.claude/commands/project/complete-task.md +7 -0
- package/all/copy-overwrite/.claude/commands/project/debrief.md +65 -0
- package/all/copy-overwrite/.claude/commands/project/execute.md +94 -0
- package/all/copy-overwrite/.claude/commands/project/implement.md +42 -0
- package/all/copy-overwrite/.claude/commands/project/local-code-review.md +88 -0
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +74 -0
- package/all/copy-overwrite/.claude/commands/project/plan.md +314 -0
- package/all/copy-overwrite/.claude/commands/project/research.md +248 -0
- package/all/copy-overwrite/.claude/commands/project/review.md +63 -0
- package/all/copy-overwrite/.claude/commands/project/setup.md +19 -0
- package/all/copy-overwrite/.claude/commands/project/verify.md +38 -0
- package/all/copy-overwrite/.claude/commands/pull-request/review.md +12 -0
- package/all/copy-overwrite/.claude/commands/rules/format-md.md +72 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/check.md +6 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/fix.md +3 -0
- package/all/copy-overwrite/.claude/hooks/README.md +301 -0
- package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +181 -0
- package/all/copy-overwrite/.claude/settings.json +41 -0
- package/all/copy-overwrite/.claude/settings.local.json.example +14 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/SKILL.md +405 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +416 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +316 -0
- package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +118 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/SKILL.md +210 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/all/copy-overwrite/CLAUDE.md +77 -0
- package/all/copy-overwrite/HUMAN.md +17 -0
- package/all/copy-overwrite/specs/.keep +0 -0
- package/all/create-only/PROJECT_RULES.md +0 -0
- package/cdk/merge/package.json +20 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +107 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/prompts.d.ts +45 -0
- package/dist/cli/prompts.d.ts.map +1 -0
- package/dist/cli/prompts.js +58 -0
- package/dist/cli/prompts.js.map +1 -0
- package/dist/core/config.d.ts +73 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +36 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lisa.d.ts +81 -0
- package/dist/core/lisa.d.ts.map +1 -0
- package/dist/core/lisa.js +459 -0
- package/dist/core/lisa.js.map +1 -0
- package/dist/core/manifest.d.ts +58 -0
- package/dist/core/manifest.d.ts.map +1 -0
- package/dist/core/manifest.js +104 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/detection/detector.interface.d.ts +15 -0
- package/dist/detection/detector.interface.d.ts.map +1 -0
- package/dist/detection/detector.interface.js +2 -0
- package/dist/detection/detector.interface.js.map +1 -0
- package/dist/detection/detectors/cdk.d.ts +10 -0
- package/dist/detection/detectors/cdk.d.ts.map +1 -0
- package/dist/detection/detectors/cdk.js +34 -0
- package/dist/detection/detectors/cdk.js.map +1 -0
- package/dist/detection/detectors/expo.d.ts +10 -0
- package/dist/detection/detectors/expo.d.ts.map +1 -0
- package/dist/detection/detectors/expo.js +30 -0
- package/dist/detection/detectors/expo.js.map +1 -0
- package/dist/detection/detectors/nestjs.d.ts +10 -0
- package/dist/detection/detectors/nestjs.d.ts.map +1 -0
- package/dist/detection/detectors/nestjs.js +34 -0
- package/dist/detection/detectors/nestjs.js.map +1 -0
- package/dist/detection/detectors/npm-package.d.ts +13 -0
- package/dist/detection/detectors/npm-package.d.ts.map +1 -0
- package/dist/detection/detectors/npm-package.js +30 -0
- package/dist/detection/detectors/npm-package.js.map +1 -0
- package/dist/detection/detectors/typescript.d.ts +10 -0
- package/dist/detection/detectors/typescript.d.ts.map +1 -0
- package/dist/detection/detectors/typescript.js +25 -0
- package/dist/detection/detectors/typescript.js.map +1 -0
- package/dist/detection/index.d.ts +24 -0
- package/dist/detection/index.d.ts.map +1 -0
- package/dist/detection/index.js +57 -0
- package/dist/detection/index.js.map +1 -0
- package/dist/errors/index.d.ts +69 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +110 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/console-logger.d.ts +12 -0
- package/dist/logging/console-logger.d.ts.map +1 -0
- package/dist/logging/console-logger.js +22 -0
- package/dist/logging/console-logger.js.map +1 -0
- package/dist/logging/index.d.ts +4 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +3 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.interface.d.ts +20 -0
- package/dist/logging/logger.interface.d.ts.map +1 -0
- package/dist/logging/logger.interface.js +2 -0
- package/dist/logging/logger.interface.js.map +1 -0
- package/dist/logging/silent-logger.d.ts +12 -0
- package/dist/logging/silent-logger.d.ts.map +1 -0
- package/dist/logging/silent-logger.js +21 -0
- package/dist/logging/silent-logger.js.map +1 -0
- package/dist/strategies/copy-contents.d.ts +14 -0
- package/dist/strategies/copy-contents.d.ts.map +1 -0
- package/dist/strategies/copy-contents.js +69 -0
- package/dist/strategies/copy-contents.js.map +1 -0
- package/dist/strategies/copy-overwrite.d.ts +14 -0
- package/dist/strategies/copy-overwrite.d.ts.map +1 -0
- package/dist/strategies/copy-overwrite.js +47 -0
- package/dist/strategies/copy-overwrite.js.map +1 -0
- package/dist/strategies/create-only.d.ts +13 -0
- package/dist/strategies/create-only.d.ts.map +1 -0
- package/dist/strategies/create-only.js +30 -0
- package/dist/strategies/create-only.js.map +1 -0
- package/dist/strategies/index.d.ts +31 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/index.js +52 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/strategies/merge.d.ts +13 -0
- package/dist/strategies/merge.d.ts.map +1 -0
- package/dist/strategies/merge.js +60 -0
- package/dist/strategies/merge.js.map +1 -0
- package/dist/strategies/strategy.interface.d.ts +31 -0
- package/dist/strategies/strategy.interface.d.ts.map +1 -0
- package/dist/strategies/strategy.interface.js +2 -0
- package/dist/strategies/strategy.interface.js.map +1 -0
- package/dist/transaction/backup.d.ts +38 -0
- package/dist/transaction/backup.d.ts.map +1 -0
- package/dist/transaction/backup.js +97 -0
- package/dist/transaction/backup.js.map +1 -0
- package/dist/transaction/index.d.ts +4 -0
- package/dist/transaction/index.d.ts.map +1 -0
- package/dist/transaction/index.js +3 -0
- package/dist/transaction/index.js.map +1 -0
- package/dist/transaction/transaction.d.ts +34 -0
- package/dist/transaction/transaction.d.ts.map +1 -0
- package/dist/transaction/transaction.js +68 -0
- package/dist/transaction/transaction.js.map +1 -0
- package/dist/utils/file-operations.d.ts +29 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +84 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/json-utils.d.ts +22 -0
- package/dist/utils/json-utils.d.ts.map +1 -0
- package/dist/utils/json-utils.js +57 -0
- package/dist/utils/json-utils.js.map +1 -0
- package/dist/utils/path-utils.d.ts +21 -0
- package/dist/utils/path-utils.d.ts.map +1 -0
- package/dist/utils/path-utils.js +35 -0
- package/dist/utils/path-utils.js.map +1 -0
- package/eslint-plugin-code-organization/README.md +149 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/eslint-plugin-code-organization/index.js +23 -0
- package/eslint-plugin-code-organization/package.json +10 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/SKILL.md +238 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/references/mutation-patterns.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/SKILL.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/atomic-levels.md +417 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/folder-structure.md +257 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/gluestack-mapping.md +233 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +327 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/SKILL.md +299 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/examples.md +749 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/patterns.md +318 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +198 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +207 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/SKILL.md +268 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/common-issues.md +619 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/file-extensions.md +340 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/platform-api.md +276 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +414 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/SKILL.md +202 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +443 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/SKILL.md +309 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/references/validation-patterns.md +417 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/SKILL.md +431 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/references/official-docs.md +290 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +169 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/SKILL.md +411 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/color-tokens.md +343 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/component-mapping.md +307 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/spacing-scale.md +300 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +354 -0
- package/expo/copy-overwrite/.claude/skills/local-state/SKILL.md +362 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/async-storage.md +505 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/persistence-patterns.md +711 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/reactive-variables.md +446 -0
- package/expo/copy-overwrite/.claude/skills/playwright-selectors/SKILL.md +223 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/SKILL.md +319 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/async-patterns.md +420 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/expo-router-testing.md +556 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/mocking-patterns.md +590 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/query-priority.md +291 -0
- package/expo/copy-overwrite/.easignore.extra +2 -0
- package/expo/copy-overwrite/.mcp.json +33 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/README.md +234 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +84 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +196 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +289 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +32 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +230 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +91 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +178 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +238 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +260 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +29 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +51 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +55 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +73 -0
- package/expo/copy-overwrite/eslint.config.mjs +560 -0
- package/expo/copy-overwrite/lighthouserc.js +194 -0
- package/expo/create-only/lighthouserc-config.json +28 -0
- package/expo/merge/package.json +132 -0
- package/lisa.sh +35 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/SKILL.md +176 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/advanced-features.md +527 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/project-patterns.md +483 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/quick-start.md +257 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/resolvers-mutations.md +413 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/types-scalars.md +513 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +536 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/SKILL.md +275 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/configuration-patterns.md +487 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/entity-patterns.md +450 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/observability-patterns.md +536 -0
- package/nestjs/merge/package.json +75 -0
- package/package.json +124 -0
- package/typescript/copy-contents/.husky/commit-msg +91 -0
- package/typescript/copy-contents/.husky/pre-commit +96 -0
- package/typescript/copy-contents/.husky/pre-push +211 -0
- package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +74 -0
- package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +59 -0
- package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +103 -0
- package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +388 -0
- package/typescript/copy-overwrite/.github/README.md +455 -0
- package/typescript/copy-overwrite/.github/dependabot.yml +40 -0
- package/typescript/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +129 -0
- package/typescript/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +354 -0
- package/typescript/copy-overwrite/.github/k6/README.md +386 -0
- package/typescript/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +264 -0
- package/typescript/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +115 -0
- package/typescript/copy-overwrite/.github/k6/examples/data-driven-test.js +268 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.js +142 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.json +27 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.js +26 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.json +20 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.js +244 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.json +29 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.js +180 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.json +32 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.js +206 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.json +38 -0
- package/typescript/copy-overwrite/.github/k6/scripts/api-test.js +452 -0
- package/typescript/copy-overwrite/.github/k6/scripts/default-test.js +185 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/normal.json +30 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/relaxed.json +21 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/strict.json +29 -0
- package/typescript/copy-overwrite/.github/workflows/build.yml +72 -0
- package/typescript/copy-overwrite/.github/workflows/ci.yml +49 -0
- package/typescript/copy-overwrite/.github/workflows/claude.yml +51 -0
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +113 -0
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +195 -0
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +267 -0
- package/typescript/copy-overwrite/.github/workflows/deploy.yml +228 -0
- package/typescript/copy-overwrite/.github/workflows/k6-load-test-README.md +230 -0
- package/typescript/copy-overwrite/.github/workflows/lighthouse.yml +68 -0
- package/typescript/copy-overwrite/.github/workflows/load-test.yml +282 -0
- package/typescript/copy-overwrite/.github/workflows/quality.yml +1737 -0
- package/typescript/copy-overwrite/.github/workflows/release.yml +1599 -0
- package/typescript/copy-overwrite/.gitleaksignore +28 -0
- package/typescript/copy-overwrite/.nvmrc +1 -0
- package/typescript/copy-overwrite/.prettierignore +23 -0
- package/typescript/copy-overwrite/.prettierrc.json +22 -0
- package/typescript/copy-overwrite/.versionrc +42 -0
- package/typescript/copy-overwrite/.yamllint +20 -0
- package/typescript/copy-overwrite/commitlint.config.js +11 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/README.md +149 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +23 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/package.json +10 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/typescript/copy-overwrite/eslint.config.mjs +390 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +57 -0
- package/typescript/copy-overwrite/eslint.thresholds.config.json +5 -0
- package/typescript/github-rulesets/base.json +106 -0
- package/typescript/merge/.claude/settings.json +28 -0
- package/typescript/merge/package.json +71 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# -----------------------------------------------------------------------------
|
|
2
|
+
# Sentry Issue Creation Workflow
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# ⚠️ WARNING: THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY! ⚠️
|
|
5
|
+
# Any changes may be overwritten by the generation process.
|
|
6
|
+
# This workflow creates a Sentry issue when another workflow fails.
|
|
7
|
+
# It captures details about the failure and creates a standardized issue
|
|
8
|
+
# to help track and resolve CI/CD problems in Sentry.
|
|
9
|
+
#
|
|
10
|
+
# Example usage in another workflow:
|
|
11
|
+
# ```yaml
|
|
12
|
+
# create_sentry_issue_on_failure:
|
|
13
|
+
# if: failure()
|
|
14
|
+
# uses: ./.github/workflows/create-sentry-issue-on-failure.yml
|
|
15
|
+
# with:
|
|
16
|
+
# workflow_name: 'My Workflow'
|
|
17
|
+
# failed_job: 'build_and_test'
|
|
18
|
+
# SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
|
19
|
+
# SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
|
20
|
+
# secrets:
|
|
21
|
+
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
22
|
+
# ```
|
|
23
|
+
|
|
24
|
+
name: 🔴 Sentry Issue on Workflow Failure
|
|
25
|
+
|
|
26
|
+
on:
|
|
27
|
+
workflow_call:
|
|
28
|
+
inputs:
|
|
29
|
+
workflow_name:
|
|
30
|
+
required: true
|
|
31
|
+
type: string
|
|
32
|
+
description: 'Name of the workflow that failed'
|
|
33
|
+
failed_job:
|
|
34
|
+
required: false
|
|
35
|
+
type: string
|
|
36
|
+
description: 'Name of the job that failed (optional)'
|
|
37
|
+
SENTRY_ORG:
|
|
38
|
+
required: true
|
|
39
|
+
type: string
|
|
40
|
+
description: 'Sentry organization slug (e.g., your-company)'
|
|
41
|
+
SENTRY_PROJECT:
|
|
42
|
+
required: true
|
|
43
|
+
type: string
|
|
44
|
+
description: 'Sentry project slug (e.g., serverless-knowledge-platform)'
|
|
45
|
+
environment:
|
|
46
|
+
required: false
|
|
47
|
+
type: string
|
|
48
|
+
default: 'production'
|
|
49
|
+
description: 'Environment where the failure occurred'
|
|
50
|
+
level:
|
|
51
|
+
required: false
|
|
52
|
+
type: string
|
|
53
|
+
default: 'error'
|
|
54
|
+
description: 'Sentry issue level (debug, info, warning, error, fatal)'
|
|
55
|
+
node_version:
|
|
56
|
+
description: 'Node.js version to use'
|
|
57
|
+
required: false
|
|
58
|
+
default: '20.x'
|
|
59
|
+
type: string
|
|
60
|
+
package_manager:
|
|
61
|
+
description: 'Package manager to use (npm, yarn, or bun)'
|
|
62
|
+
required: false
|
|
63
|
+
default: 'npm'
|
|
64
|
+
type: string
|
|
65
|
+
working_directory:
|
|
66
|
+
description: 'Directory to run commands in (if not root)'
|
|
67
|
+
required: false
|
|
68
|
+
default: ''
|
|
69
|
+
type: string
|
|
70
|
+
secrets:
|
|
71
|
+
SENTRY_AUTH_TOKEN:
|
|
72
|
+
required: true
|
|
73
|
+
description: 'Sentry Auth Token with project:write scope'
|
|
74
|
+
|
|
75
|
+
# Concurrency is managed by the parent workflow that calls this one
|
|
76
|
+
# This avoids deadlocks between parent and child workflows
|
|
77
|
+
|
|
78
|
+
jobs:
|
|
79
|
+
create_sentry_issue:
|
|
80
|
+
name: 📝 Create Sentry Issue
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
timeout-minutes: 5
|
|
83
|
+
steps:
|
|
84
|
+
- name: 📥 Checkout repository
|
|
85
|
+
uses: actions/checkout@v4
|
|
86
|
+
|
|
87
|
+
- name: 🔧 Setup Node.js
|
|
88
|
+
uses: actions/setup-node@v4
|
|
89
|
+
with:
|
|
90
|
+
node-version: ${{ inputs.node_version }}
|
|
91
|
+
cache: ${{ inputs.package_manager }}
|
|
92
|
+
|
|
93
|
+
- name: 🔴 Create Sentry Issue
|
|
94
|
+
id: create_sentry_issue
|
|
95
|
+
run: |
|
|
96
|
+
cd "${{ inputs.working_directory || '.' }}"
|
|
97
|
+
|
|
98
|
+
# Set variables
|
|
99
|
+
WORKFLOW_NAME="${{ inputs.workflow_name }}"
|
|
100
|
+
FAILED_JOB="${{ inputs.failed_job || 'Unknown' }}"
|
|
101
|
+
ENVIRONMENT="${{ inputs.environment }}"
|
|
102
|
+
LEVEL="${{ inputs.level }}"
|
|
103
|
+
RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
104
|
+
|
|
105
|
+
# Get commit message, handling special characters properly
|
|
106
|
+
COMMIT_MESSAGE="${{ github.event.head_commit.message || 'N/A' }}"
|
|
107
|
+
|
|
108
|
+
# Create error message
|
|
109
|
+
if [ "$FAILED_JOB" != "Unknown" ]; then
|
|
110
|
+
ERROR_MESSAGE="CI/CD Workflow Failure: ${WORKFLOW_NAME} - ${FAILED_JOB}"
|
|
111
|
+
else
|
|
112
|
+
ERROR_MESSAGE="CI/CD Workflow Failure: ${WORKFLOW_NAME}"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Get current timestamp in ISO format
|
|
116
|
+
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
|
|
117
|
+
|
|
118
|
+
# Create JSON payload for Sentry API using jq for proper escaping
|
|
119
|
+
PAYLOAD=$(jq -n \
|
|
120
|
+
--arg message "${ERROR_MESSAGE}" \
|
|
121
|
+
--arg level "${LEVEL}" \
|
|
122
|
+
--arg timestamp "${TIMESTAMP}" \
|
|
123
|
+
--arg workflow_name "${WORKFLOW_NAME}" \
|
|
124
|
+
--arg failed_job "${FAILED_JOB}" \
|
|
125
|
+
--arg run_url "${RUN_URL}" \
|
|
126
|
+
--arg repository "${{ github.repository }}" \
|
|
127
|
+
--arg commit "${{ github.sha }}" \
|
|
128
|
+
--arg commit_message "${COMMIT_MESSAGE}" \
|
|
129
|
+
--arg triggered_by "${{ github.actor }}" \
|
|
130
|
+
--arg environment "${ENVIRONMENT}" \
|
|
131
|
+
--arg ref "${{ github.ref }}" \
|
|
132
|
+
--arg run_id "${{ github.run_id }}" \
|
|
133
|
+
'{
|
|
134
|
+
"message": $message,
|
|
135
|
+
"level": $level,
|
|
136
|
+
"timestamp": $timestamp,
|
|
137
|
+
"platform": "other",
|
|
138
|
+
"sdk": {
|
|
139
|
+
"name": "github-actions",
|
|
140
|
+
"version": "1.0.0"
|
|
141
|
+
},
|
|
142
|
+
"logger": "github-actions.ci",
|
|
143
|
+
"environment": $environment,
|
|
144
|
+
"tags": {
|
|
145
|
+
"workflow": $workflow_name,
|
|
146
|
+
"job": $failed_job,
|
|
147
|
+
"repository": $repository,
|
|
148
|
+
"triggered_by": $triggered_by,
|
|
149
|
+
"ref": $ref,
|
|
150
|
+
"source": "github-actions"
|
|
151
|
+
},
|
|
152
|
+
"extra": {
|
|
153
|
+
"workflow_run_url": $run_url,
|
|
154
|
+
"commit_sha": $commit,
|
|
155
|
+
"commit_message": $commit_message,
|
|
156
|
+
"run_id": $run_id,
|
|
157
|
+
"failure_type": "ci_cd_workflow"
|
|
158
|
+
},
|
|
159
|
+
"contexts": {
|
|
160
|
+
"runtime": {
|
|
161
|
+
"name": "github-actions",
|
|
162
|
+
"version": "latest"
|
|
163
|
+
},
|
|
164
|
+
"os": {
|
|
165
|
+
"name": "ubuntu-latest"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"fingerprint": ["github-actions", $workflow_name, $failed_job]
|
|
169
|
+
}')
|
|
170
|
+
|
|
171
|
+
# Debug: Print the payload to see what'\''s being sent (without sensitive data)
|
|
172
|
+
echo "Debug: Generated payload:"
|
|
173
|
+
echo "$PAYLOAD" | jq 'del(.extra.commit_message)' | head -20
|
|
174
|
+
|
|
175
|
+
# Debug: Print Sentry configuration
|
|
176
|
+
echo "Debug: SENTRY_ORG=${{ inputs.SENTRY_ORG }}"
|
|
177
|
+
echo "Debug: SENTRY_PROJECT=${{ inputs.SENTRY_PROJECT }}"
|
|
178
|
+
echo "Debug: API URL=https://sentry.io/api/0/projects/${{ inputs.SENTRY_ORG }}/${{ inputs.SENTRY_PROJECT }}/store/"
|
|
179
|
+
|
|
180
|
+
# First, let's get the DSN for this project
|
|
181
|
+
DSN_RESPONSE=$(curl -s -w "\n%{http_code}" \
|
|
182
|
+
-H "Authorization: Bearer ${{ secrets.SENTRY_AUTH_TOKEN }}" \
|
|
183
|
+
"https://sentry.io/api/0/projects/${{ inputs.SENTRY_ORG }}/${{ inputs.SENTRY_PROJECT }}/keys/")
|
|
184
|
+
|
|
185
|
+
DSN_STATUS=$(echo "$DSN_RESPONSE" | tail -n1)
|
|
186
|
+
DSN_BODY=$(echo "$DSN_RESPONSE" | head -n -1)
|
|
187
|
+
|
|
188
|
+
if [ "$DSN_STATUS" = "200" ]; then
|
|
189
|
+
# Extract the DSN from the first key
|
|
190
|
+
DSN=$(echo "$DSN_BODY" | jq -r '.[0].dsn.public // empty')
|
|
191
|
+
echo "Debug: Found DSN: ${DSN:0:50}..." # Show first 50 chars for security
|
|
192
|
+
|
|
193
|
+
# Parse DSN to get the project ID and key
|
|
194
|
+
if [[ $DSN =~ https://([^@]+)@([^/]+)/([0-9]+) ]]; then
|
|
195
|
+
SENTRY_KEY="${BASH_REMATCH[1]}"
|
|
196
|
+
SENTRY_HOST="${BASH_REMATCH[2]}"
|
|
197
|
+
PROJECT_ID="${BASH_REMATCH[3]}"
|
|
198
|
+
|
|
199
|
+
# Call Sentry API to create issue using the store endpoint with proper auth
|
|
200
|
+
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
|
201
|
+
-H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY" \
|
|
202
|
+
-H "Content-Type: application/json" \
|
|
203
|
+
-X POST \
|
|
204
|
+
--data "${PAYLOAD}" \
|
|
205
|
+
"https://${SENTRY_HOST}/api/${PROJECT_ID}/store/")
|
|
206
|
+
else
|
|
207
|
+
echo "Error: Could not parse DSN"
|
|
208
|
+
exit 1
|
|
209
|
+
fi
|
|
210
|
+
else
|
|
211
|
+
echo "Error: Could not retrieve project DSN. Status: $DSN_STATUS"
|
|
212
|
+
echo "Response: $DSN_BODY"
|
|
213
|
+
exit 1
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
# Extract HTTP status code from response
|
|
217
|
+
HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
|
|
218
|
+
RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
|
|
219
|
+
|
|
220
|
+
echo "HTTP Status: $HTTP_STATUS"
|
|
221
|
+
|
|
222
|
+
if [ "$HTTP_STATUS" = "200" ] || [ "$HTTP_STATUS" = "201" ]; then
|
|
223
|
+
# Extract issue ID from response
|
|
224
|
+
ISSUE_ID=$(echo "$RESPONSE_BODY" | jq -r '.id // empty')
|
|
225
|
+
|
|
226
|
+
if [ -n "$ISSUE_ID" ] && [ "$ISSUE_ID" != "null" ]; then
|
|
227
|
+
echo "Successfully created Sentry issue: $ISSUE_ID"
|
|
228
|
+
echo "issue_id=$ISSUE_ID" >> $GITHUB_OUTPUT
|
|
229
|
+
echo "issue_url=https://sentry.io/organizations/${{ inputs.SENTRY_ORG }}/issues/?project=${{ inputs.SENTRY_PROJECT }}&query=$ISSUE_ID" >> $GITHUB_OUTPUT
|
|
230
|
+
else
|
|
231
|
+
echo "Issue created but no ID returned. Response:"
|
|
232
|
+
echo "$RESPONSE_BODY" | jq . || echo "$RESPONSE_BODY"
|
|
233
|
+
fi
|
|
234
|
+
else
|
|
235
|
+
echo "Failed to create Sentry issue. API response:"
|
|
236
|
+
echo "Status: $HTTP_STATUS"
|
|
237
|
+
echo "Body: $RESPONSE_BODY"
|
|
238
|
+
|
|
239
|
+
# Provide helpful error messages
|
|
240
|
+
if [ "$HTTP_STATUS" = "400" ]; then
|
|
241
|
+
echo "Error: Bad request. Please check the payload format."
|
|
242
|
+
elif [ "$HTTP_STATUS" = "401" ]; then
|
|
243
|
+
echo "Error: Authentication failed. Please check SENTRY_AUTH_TOKEN."
|
|
244
|
+
elif [ "$HTTP_STATUS" = "403" ]; then
|
|
245
|
+
echo "Error: Permission denied. Please check token permissions (needs project:write)."
|
|
246
|
+
elif [ "$HTTP_STATUS" = "404" ]; then
|
|
247
|
+
echo "Error: Project not found. Please check SENTRY_ORG and SENTRY_PROJECT."
|
|
248
|
+
elif [ "$HTTP_STATUS" = "429" ]; then
|
|
249
|
+
echo "Error: Rate limit exceeded. Please try again later."
|
|
250
|
+
fi
|
|
251
|
+
|
|
252
|
+
exit 1
|
|
253
|
+
fi
|
|
254
|
+
|
|
255
|
+
- name: 📢 Report Issue Creation
|
|
256
|
+
if: steps.create_sentry_issue.outputs.issue_id
|
|
257
|
+
run: |
|
|
258
|
+
cd "${{ inputs.working_directory || '.' }}"
|
|
259
|
+
echo "Created Sentry issue: ${{ steps.create_sentry_issue.outputs.issue_id }}"
|
|
260
|
+
echo "Issue URL: ${{ steps.create_sentry_issue.outputs.issue_url }}"
|
|
261
|
+
|
|
262
|
+
- name: 📢 Report Creation Attempt
|
|
263
|
+
if: steps.create_sentry_issue.conclusion == 'success' && !steps.create_sentry_issue.outputs.issue_id
|
|
264
|
+
run: |
|
|
265
|
+
cd "${{ inputs.working_directory || '.' }}"
|
|
266
|
+
echo "Sentry event was sent successfully, but issue ID was not returned."
|
|
267
|
+
echo "Check your Sentry dashboard: https://sentry.io/organizations/${{ inputs.SENTRY_ORG }}/issues/?project=${{ inputs.SENTRY_PROJECT }}"
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# This is an example deployment workflow that demonstrates the recommended pattern:
|
|
2
|
+
# 1. Call the release.yml workflow to create a release
|
|
3
|
+
# 2. Implement your custom deployment logic
|
|
4
|
+
# 3. Optionally run load tests for staging deployments
|
|
5
|
+
#
|
|
6
|
+
# The release.yml workflow is kept separate from deployment to allow:
|
|
7
|
+
# - Different deployment strategies per project (AWS, Azure, GCP, etc.)
|
|
8
|
+
# - Custom deployment logic without modifying the release workflow
|
|
9
|
+
# - Optional load testing based on environment
|
|
10
|
+
# - Flexibility to deploy the same release to multiple environments
|
|
11
|
+
|
|
12
|
+
name: 🚀 Release and Deploy
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches:
|
|
17
|
+
- main
|
|
18
|
+
- staging
|
|
19
|
+
- dev
|
|
20
|
+
workflow_dispatch:
|
|
21
|
+
inputs:
|
|
22
|
+
environment:
|
|
23
|
+
description: 'Environment to deploy to'
|
|
24
|
+
required: true
|
|
25
|
+
default: 'dev'
|
|
26
|
+
type: choice
|
|
27
|
+
options:
|
|
28
|
+
- main
|
|
29
|
+
- staging
|
|
30
|
+
- dev
|
|
31
|
+
|
|
32
|
+
# Prevent concurrent runs of the same workflow on the same ref
|
|
33
|
+
concurrency:
|
|
34
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
35
|
+
cancel-in-progress: true
|
|
36
|
+
|
|
37
|
+
jobs:
|
|
38
|
+
# Environment setup
|
|
39
|
+
determine_environment:
|
|
40
|
+
name: 🌍 Determine Environment
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
timeout-minutes: 5
|
|
43
|
+
outputs:
|
|
44
|
+
environment: ${{ steps.env.outputs.environment }}
|
|
45
|
+
steps:
|
|
46
|
+
- name: 🔄 Set environment
|
|
47
|
+
id: env
|
|
48
|
+
run: |
|
|
49
|
+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
|
50
|
+
echo "environment=${{ github.event.inputs.environment }}" >> $GITHUB_OUTPUT
|
|
51
|
+
else
|
|
52
|
+
echo "environment=${{ github.ref_name }}" >> $GITHUB_OUTPUT
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
release:
|
|
56
|
+
name: 📦 Release
|
|
57
|
+
# Reference to the quality checks workflow
|
|
58
|
+
uses: ./.github/workflows/release.yml
|
|
59
|
+
needs: [determine_environment]
|
|
60
|
+
with:
|
|
61
|
+
environment: ${{ needs.determine_environment.outputs.environment }}
|
|
62
|
+
release_strategy: 'standard-version'
|
|
63
|
+
skip_jobs: 'test:e2e,test:unit,test:integration'
|
|
64
|
+
require_approval: false
|
|
65
|
+
require_signatures: false
|
|
66
|
+
generate_sbom: true
|
|
67
|
+
node_version: '22.21.1'
|
|
68
|
+
package_manager: 'bun'
|
|
69
|
+
override_blackout: true
|
|
70
|
+
emergency_release: false
|
|
71
|
+
secrets: inherit
|
|
72
|
+
|
|
73
|
+
# Step 2: Deploy to AWS (Custom deployment logic)
|
|
74
|
+
check_eas_setup:
|
|
75
|
+
name: Check EAS Setup
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
needs: [determine_environment]
|
|
78
|
+
outputs:
|
|
79
|
+
has_eas_setup: ${{ steps.check.outputs.has_eas_setup }}
|
|
80
|
+
steps:
|
|
81
|
+
- id: check
|
|
82
|
+
run: |
|
|
83
|
+
if [[ -z "${EXPO_TOKEN}" ]]; then
|
|
84
|
+
echo "has_eas_setup=false" >> $GITHUB_OUTPUT
|
|
85
|
+
else
|
|
86
|
+
echo "has_eas_setup=true" >> $GITHUB_OUTPUT
|
|
87
|
+
fi
|
|
88
|
+
env:
|
|
89
|
+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
|
|
90
|
+
|
|
91
|
+
# Check if app.config.ts has changed
|
|
92
|
+
check_app_config_changes:
|
|
93
|
+
name: Check App Config Changes
|
|
94
|
+
runs-on: ubuntu-latest
|
|
95
|
+
needs: [determine_environment]
|
|
96
|
+
outputs:
|
|
97
|
+
app_config_changed: ${{ steps.check_changes.outputs.app_config_changed }}
|
|
98
|
+
steps:
|
|
99
|
+
- name: 📥 Checkout
|
|
100
|
+
uses: actions/checkout@v4
|
|
101
|
+
with:
|
|
102
|
+
fetch-depth: 2
|
|
103
|
+
|
|
104
|
+
- name: Check if app.config.ts changed
|
|
105
|
+
id: check_changes
|
|
106
|
+
run: |
|
|
107
|
+
if git diff --name-only HEAD^ HEAD | grep -q "app.config.ts"; then
|
|
108
|
+
echo "app_config_changed=true" >> $GITHUB_OUTPUT
|
|
109
|
+
echo "app.config.ts has been modified"
|
|
110
|
+
else
|
|
111
|
+
echo "app_config_changed=false" >> $GITHUB_OUTPUT
|
|
112
|
+
echo "app.config.ts has not been modified"
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# Trigger EAS Build if needed (only runs if app.config.ts changed)
|
|
116
|
+
trigger_eas_build:
|
|
117
|
+
name: Trigger EAS Build
|
|
118
|
+
needs: [determine_environment, check_eas_setup, check_app_config_changes]
|
|
119
|
+
if: needs.check_eas_setup.outputs.has_eas_setup == 'true' && needs.check_app_config_changes.outputs.app_config_changed == 'true'
|
|
120
|
+
uses: ./.github/workflows/build.yml
|
|
121
|
+
with:
|
|
122
|
+
environment: ${{ needs.determine_environment.outputs.environment }}
|
|
123
|
+
secrets:
|
|
124
|
+
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
|
|
125
|
+
|
|
126
|
+
# EAS Deploy/Publish
|
|
127
|
+
deploy:
|
|
128
|
+
name: 🚀 Deploy to EAS
|
|
129
|
+
runs-on: ubuntu-latest
|
|
130
|
+
needs:
|
|
131
|
+
[
|
|
132
|
+
determine_environment,
|
|
133
|
+
check_eas_setup,
|
|
134
|
+
release,
|
|
135
|
+
check_app_config_changes,
|
|
136
|
+
]
|
|
137
|
+
# Run if EAS is set up, regardless of whether trigger_eas_build ran or was skipped
|
|
138
|
+
if: |
|
|
139
|
+
always() &&
|
|
140
|
+
needs.check_eas_setup.outputs.has_eas_setup == 'true' &&
|
|
141
|
+
needs.release.result == 'success'
|
|
142
|
+
steps:
|
|
143
|
+
- name: Checkout repository
|
|
144
|
+
uses: actions/checkout@v4
|
|
145
|
+
with:
|
|
146
|
+
ref: ${{ github.ref }} # Use branch HEAD to include version bump from release job
|
|
147
|
+
- name: 🔧 Setup Node.js
|
|
148
|
+
uses: actions/setup-node@v4
|
|
149
|
+
with:
|
|
150
|
+
node-version: '22.21.1'
|
|
151
|
+
- name: 🍞 Setup Bun
|
|
152
|
+
uses: oven-sh/setup-bun@v2
|
|
153
|
+
with:
|
|
154
|
+
bun-version: latest
|
|
155
|
+
- name: Setup EAS
|
|
156
|
+
uses: expo/expo-github-action@v8
|
|
157
|
+
with:
|
|
158
|
+
eas-version: latest
|
|
159
|
+
token: ${{ secrets.EXPO_TOKEN }}
|
|
160
|
+
- name: Set Env
|
|
161
|
+
run: echo "PUPPETEER_SKIP_DOWNLOAD=true" >> $GITHUB_ENV
|
|
162
|
+
- name: Install dependencies
|
|
163
|
+
run: bun install
|
|
164
|
+
- name: Copy environment file
|
|
165
|
+
uses: canastro/copy-file-action@master
|
|
166
|
+
with:
|
|
167
|
+
source: ".env.${{ needs.determine_environment.outputs.environment == 'main' && 'production' || needs.determine_environment.outputs.environment == 'dev' && 'development' || needs.determine_environment.outputs.environment}}"
|
|
168
|
+
target: '.env'
|
|
169
|
+
- name: Copy environment file for production
|
|
170
|
+
if: needs.determine_environment.outputs.environment != 'main'
|
|
171
|
+
uses: canastro/copy-file-action@master
|
|
172
|
+
with:
|
|
173
|
+
source: ".env.${{ needs.determine_environment.outputs.environment == 'dev' && 'development' || needs.determine_environment.outputs.environment }}"
|
|
174
|
+
target: '.env.production'
|
|
175
|
+
- name: Get version for deploy message
|
|
176
|
+
id: get_version
|
|
177
|
+
run: |
|
|
178
|
+
# Use release output version if available, otherwise read from package.json
|
|
179
|
+
RELEASE_VERSION="${{ needs.release.outputs.version }}"
|
|
180
|
+
if [ -n "$RELEASE_VERSION" ]; then
|
|
181
|
+
echo "version=$RELEASE_VERSION" >> $GITHUB_OUTPUT
|
|
182
|
+
echo "Using release version: $RELEASE_VERSION"
|
|
183
|
+
else
|
|
184
|
+
PKG_VERSION=$(node -p "require('./package.json').version")
|
|
185
|
+
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
|
|
186
|
+
echo "Using package.json version (promotion detected): $PKG_VERSION"
|
|
187
|
+
fi
|
|
188
|
+
- name: Publish update
|
|
189
|
+
run: STAGE=${{ needs.determine_environment.outputs.environment == 'main' && 'production' || needs.determine_environment.outputs.environment}} NODE_OPTIONS="--max-old-space-size=8192" eas update --auto --channel=${{ needs.determine_environment.outputs.environment == 'main' && 'production' || needs.determine_environment.outputs.environment}} --message="Update to v${{ steps.get_version.outputs.version }}"
|
|
190
|
+
- name: Publish preview update
|
|
191
|
+
run: STAGE=${{ needs.determine_environment.outputs.environment == 'main' && 'production' || needs.determine_environment.outputs.environment}} NODE_OPTIONS="--max-old-space-size=8192" eas update --channel=${{ needs.determine_environment.outputs.environment == 'main' && 'production' || needs.determine_environment.outputs.environment}}-preview --message="Preview update v${{ steps.get_version.outputs.version }}"
|
|
192
|
+
|
|
193
|
+
- name: 📢 Notify on success
|
|
194
|
+
run: echo "Successfully deployed version ${{ steps.get_version.outputs.version }} to ${{ needs.determine_environment.outputs.environment }}"
|
|
195
|
+
|
|
196
|
+
# Step 3: Load testing for staging deployments
|
|
197
|
+
# load_testing:
|
|
198
|
+
# name: 🔍 Load Testing
|
|
199
|
+
# needs: [determine_environment, release, deploy]
|
|
200
|
+
# if: |
|
|
201
|
+
# always() &&
|
|
202
|
+
# !cancelled() &&
|
|
203
|
+
# needs.deploy.result == 'success' &&
|
|
204
|
+
# (needs.determine_environment.outputs.environment == 'staging' || needs.determine_environment.outputs.environment == 'stage')
|
|
205
|
+
# uses: ./.github/workflows/load-test.yml
|
|
206
|
+
# with:
|
|
207
|
+
# environment: ${{ needs.determine_environment.outputs.environment }}
|
|
208
|
+
# test_scenario: 'smoke' # Start with smoke test after deployment
|
|
209
|
+
# base_url: ${{ needs.deploy.outputs.environment_url }}
|
|
210
|
+
# test_duration: '5m'
|
|
211
|
+
# virtual_users: 50
|
|
212
|
+
# fail_on_threshold: false # Don't fail the release if load test fails
|
|
213
|
+
# upload_results: true
|
|
214
|
+
# secrets: inherit
|
|
215
|
+
|
|
216
|
+
create_sentry_issue_on_failure:
|
|
217
|
+
name: 🚨 Create Sentry Issue on Failure
|
|
218
|
+
needs: [release, deploy]
|
|
219
|
+
if: ${{ always() && (needs.release.result == 'failure' || needs.deploy.result == 'failure') && !contains(github.event.head_commit.message, '[skip ci]') }}
|
|
220
|
+
uses: ./.github/workflows/create-sentry-issue-on-failure.yml
|
|
221
|
+
with:
|
|
222
|
+
package_manager: 'bun'
|
|
223
|
+
node_version: '22.21.1'
|
|
224
|
+
workflow_name: 'Release and Deploy'
|
|
225
|
+
failed_job: ${{ needs.release.result == 'failure' && 'release' || 'deploy' }}
|
|
226
|
+
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
|
227
|
+
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
|
228
|
+
secrets: inherit
|