Skip to content

Commit

Permalink
Merge pull request #409 from WatchItDev/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
geolffreym authored Jan 10, 2025
2 parents f5628aa + a37662f commit 8fd7f11
Show file tree
Hide file tree
Showing 187 changed files with 17,667 additions and 6,021 deletions.
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PORT=
VITE_ENVIRONMENT=

VITE_WEB3_CLIENT_ID=
VITE_PIMLICO=

VITE_RPC=
VITE_MMC_ADDRESS=
VITE_AGREEMENT_PORTAL_ADDRESS=
VITE_SUBSCRIPTION_POLICY_ADDRESS=
VITE_RIGHT_POLICY_AUTHORIZER=
VITE_SENTRY_AUTH_TOKEN=
VITE_SENTRY_DNS=
VITE_PINATA_API_KEY=
VITE_PINATA_SECRET_API_KEY=
VITE_SUPABASE_API_KEY=
VITE_SUPABASE_URL=
25 changes: 25 additions & 0 deletions .env.vault
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#/-------------------.env.vault---------------------/
#/ cloud-agnostic vaulting standard /
#/ [how it works](https://dotenv.org/env-vault) /
#/--------------------------------------------------/

# development
DOTENV_VAULT_DEVELOPMENT="Z/VbltnMze9cYXUM3tDf3x9oXUDrBaespVzFFt7zEz76MxExe1rf30Sm52AuD07OBdSEkH9Yxm0IjLxCOme875JHDV2k/779zwIq38ejzk2vMr4tMgFc8r+mHM0MYYra7fsslrIBRGZH8CUlzb3M8fNdJh3Ty3c5Zq3FwAGdh/SGKdzkMuXKY4h4E41s/i2hBlaYQ7b6jjIWlU+ROcoKeoVQQhobgiNvyVa74nGbmMyiFeNnEh/7pMNpikV7s7PkQS2DoM1NywmH5xdUvlqXq08SV4OD4dJ4+ZEkDsyqzVaXUw/i7vPDX0vclZe/hlxG9LxBYVzkDPQcD12fAHfdhg2O7Ew6LlT9Xd+bUgC70iWJSidU9uz7QqD9Mxe0CRuRIPmu8J5FhXwepWMCXhQHjNXmZEIS5/aphgWwzSzZWyC7u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HN5x5RQrcXyf77x7Mwzjir9wT6FMp71Y0lySZ5NHGYkV2ldQ5d5LsTj2sFVp+/CyYyRkJmNX52t0oFaLyqh+i40oSuAxSMGwbyrAsVZ+ZRXMjZsnBeGrXWDJRM/thVr6VjtJ6xDNUb57JrxIL8guQdVI9x7TtRCPUbCaNbx8RO0NTdkEgbIhEMyawayQdx2DAFOzoIK5ni7Tw12ARwI5g2HIxF/1jewCbW8e/I2AAc+JJNhj2CbI8GzLbYcUckPZQ29TDaZ1wUT/u"
DOTENV_VAULT_DEVELOPMENT_VERSION=2

# ci
DOTENV_VAULT_CI="2RMvym2VpKgFwQU/+28jDyZwBfnjJ4e9miS2wlfKjuLahr9F"
DOTENV_VAULT_CI_VERSION=1

# staging
DOTENV_VAULT_STAGING="TvjGDH3+7zHwWAvzQcTsBvYxbKRXceh/v8QHFx2Jv0+r+NeV"
DOTENV_VAULT_STAGING_VERSION=1

# production
DOTENV_VAULT_PRODUCTION="84hmBsRW1Lnq0TYPP6mdJwLCyj8qTeBUXn+TetyP7ZypQk2r"
DOTENV_VAULT_PRODUCTION_VERSION=1

#/----------------settings/metadata-----------------/
DOTENV_VAULT="vlt_9414e2f679ec3a1cc4d836b3f663277d1713a8c1157193f8982f296cbd901229"
DOTENV_API_URL="https://vault.dotenv.org"
DOTENV_CLI="npx dotenv-vault@latest"
87 changes: 7 additions & 80 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
environment:
description: "Deploy environment"
default: "staging"
default: next
required: false
type: string

Expand All @@ -14,87 +14,14 @@ concurrency:
cancel-in-progress: true

jobs:
android:
# if we add in the commit [no android] android build is ignored
if: ${{ !contains(github.event.head_commit.message, '[no android]') }}
app:
environment: ${{ inputs.environment}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'tem'

- name: Install dependencies
run: npm ci

- name: Collecting .env from dotenv-vault
run: npx dotenv-vault@latest pull ${{ inputs.environment }} .env -m ${{ secrets.DOTENV_ME }} -y

- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true
working-directory: "android"

- name: Deploying Android
uses: maierj/[email protected]
with:
lane: "beta"
subdirectory: "android"

ios:
# if we add in the commit [no ios] android build is ignored
if: ${{ !contains(github.event.head_commit.message, '[no ios]') }}
environment: ${{ inputs.environment}}
# https://github.com/actions/runner-images/blob/macos-13/20231218.2/images/macos/macos-13-arm64-Readme.md
runs-on: macos-latest-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
check-latest: true
node-version: "latest"
registry-url: "http://registry.npmjs.org/"
architecture: "arm64" # optional, x64 or x86. If not specified, x64 will be used by default
cache-dependency-path: "**/package-lock.json"

- name: Install dependencies
run: |
npm install -g npm@latest
npm ci
- name: Collecting .env from dotenv-vault
run: npx dotenv-vault@latest pull ${{ inputs.environment }} .env -m ${{ secrets.DOTENV_ME }} -y

- run: |
pod cache clean --all
rm -rf Podfile.lock
pod repo update
- uses: ruby/setup-ruby@v1
- name: Deploy app
uses: johnbeynon/[email protected]
with:
ruby-version: "3.3"
bundler-cache: true
working-directory: "ios"
service-id: ${{ secrets.RENDER_SERVICE_ID }}
api-key: ${{ secrets.RENDER_API_KEY }}

- name: Deploying IOS
uses: maierj/[email protected]
with:
lane: "ios beta"
subdirectory: "ios"
env:
NO_FLIPPER: 1

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: npm ci

- name: Run static analysis
run: make lint
run: npm run lint

- name: Test
run: make test
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ name: Staging CI/CD
on:
push:
branches:
- staging

- next
jobs:
Continuous-Integration:
uses: ./.github/workflows/ci.yml
secrets: inherit
# Continuous-Integration:
# uses: ./.github/workflows/ci.yml
# secrets: inherit
Create-Release:
needs: [Continuous-Integration]
# needs: [Continuous-Integration]
uses: ./.github/workflows/release.yml
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
secrets: inherit
Deploy-Beta:
Deploy-Next:
needs: [Create-Release]
uses: ./.github/workflows/cd.yml
secrets: inherit
18 changes: 4 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
inputs:
environment:
description: "Release to environment"
default: "staging"
default: next
required: false
type: string

Expand All @@ -19,8 +19,8 @@ jobs:
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_ID }}
private_key: ${{ secrets.BOT_PRIVATE }}
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
Expand All @@ -44,14 +44,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GH_TOKEN: ${{ steps.generate_token.outputs.token }}

- name: Create Sentry release
# only run an action if a new version was created.
if: steps.semantic.outputs.new-release-published == 'true'
uses: getsentry/action-release@v1
with:
environment: ${{ inputs.environment }}
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}

15 changes: 15 additions & 0 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Staging CI/CD
# https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
on:
push:
branches:
- main
jobs:
# Continuous-Integration:
# uses: ./.github/workflows/ci.yml
# secrets: inherit
Deploy-App:
uses: ./.github/workflows/cd.yml
secrets: inherit
with:
environment: "production"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ yarn-error.log*

# Sentry Config File
.env.sentry-build-plugin

.env*
.flaskenv*
!.env.project
!.env.vault
Loading

0 comments on commit 8fd7f11

Please sign in to comment.