Feat/3 #9
Workflow file for this run
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: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install dependencies | |
run: npm install | |
- name: Update requirements.txt | |
run: | | |
pip install -r requirements.txt | |
pip freeze > requirements.txt | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add requirements.txt | |
git commit -m "Update requirements.txt" || echo "No changes to commit" | |
git push origin main || echo "No changes to push" | |
- name: SonarCloud analysis | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.projectKey=robjo82_othello-ai | |
-Dsonar.organization=robjo82 | |
- name: Semantic Release | |
run: npm run semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |