Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adrienne / Added environment variables for analytics initialisation #824

Merged
8 changes: 8 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ inputs:
description: "Target Environment"
required: true
default: staging
RUDDERSTACK_KEY:
description: "Rudderstack key for initialising analytics"
required: false
GROWTHBOOK_CLIENT_KEY:
description: "Growthbook client key for initialising analytics"
required: false
runs:
using: composite
steps:
- name: Building dist for ${{ inputs.target }}
env:
TARGET_ENV: ${{ inputs.target }}
RUDDERSTACK_KEY: ${{ inputs.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ inputs.GROWTHBOOK_CLIENT_KEY }}
run: node_modules/grunt/bin/grunt releaseci --$TARGET_ENV
shell: bash
5 changes: 5 additions & 0 deletions .github/workflows/generate_preview_link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:
jobs:
build_and_deploy_preview_link:
runs-on: Ubuntu-latest
environment: Development
permissions:
checks: write
pull-requests: write
Expand Down Expand Up @@ -48,11 +49,15 @@ jobs:
uses: "./.github/actions/build"
with:
target: staging
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}

- name: Build Translations
uses: "./.github/actions/build"
with:
target: translations
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}

- name: "Run Tests"
run: npm run test
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build_and_test:
name: Build and Test
environment: Production
runs-on: ubuntu-latest
env:
RELEASE_TYPE: Production
Expand All @@ -22,6 +23,8 @@ jobs:
uses: "./.github/actions/build"
with:
target: production
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Versioning
uses: "./.github/actions/versioning"
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build_and_test:
name: Build and Test
environment: Staging
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -20,10 +21,14 @@ jobs:
uses: "./.github/actions/build"
with:
target: staging
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Build Translations
uses: "./.github/actions/build"
with:
target: translations
RUDDERSTACK_KEY: ${{ vars.RUDDERSTACK_KEY }}
GROWTHBOOK_CLIENT_KEY: ${{ vars.GROWTHBOOK_CLIENT_KEY }}
- name: Versioning
uses: "./.github/actions/versioning"
with:
Expand Down
Loading