Skip to content

Commit

Permalink
Merge pull request #7 from AI-Champions/ci-for-releasing
Browse files Browse the repository at this point in the history
Ci for releasing
  • Loading branch information
darielnoel authored Jul 16, 2024
2 parents ded4bab + ccfe16e commit 671387d
Show file tree
Hide file tree
Showing 3 changed files with 421 additions and 1,084 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,7 @@ on:
required: true

jobs:
pre-release-checks:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install dependencies
run: npm install --also=dev

- name: Build for integration tests
run: npm run build:test

- name: Run integration tests
run: npm run test:integration

- name: Build production version
run: npm run build

- name: Run e2e tests
run: npm run test:e2e

release:
needs: pre-release-checks
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand All @@ -51,7 +19,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: 'main' # Ensures the main branch is checked out
ref: 'main' # Ensures the main branch is checked out

- name: Set up Node.js
uses: actions/setup-node@v2
Expand All @@ -76,6 +44,13 @@ jobs:
- name: Build production version
run: npm run build

- name: Display changes
run: |
echo "Showing status..."
git status
echo "Showing diff..."
git diff
- name: Update package.json version and create Git tag
run: npm version ${{ github.event.inputs.version }}

Expand Down
Loading

0 comments on commit 671387d

Please sign in to comment.