Merge pull request #21 from omnisat/test #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
jobs: | |
generate-release-notes: | |
runs-on: ubuntu-latest | |
environment: prod # Make sure to specify your environment name here | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.6.6 | |
- name: Install Python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install openai | |
- name: Check if OPENAI_API_KEY is set | |
run: | | |
if [ -z "$OPENAI_API_KEY" ]; then | |
echo "OPENAI_API_KEY is not set" | |
exit 1 | |
else | |
echo "OPENAI_API_KEY is set" | |
fi | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
- name: Generate Release Notes with GPT | |
run: | | |
python3 scripts/generate_release_notes.py | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |