docs: Update README to clarify instructions for running scripts #7
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
black-check: | |
name: Black Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Set up Python 3.10 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install Black | |
run: pip install black | |
- name: Check Python files with Black | |
run: black --check . --exclude ".*pb2.*\.py" | |
install-dependencies: | |
name: Install Python Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Set up Python 3.10 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then | |
pip install -r requirements.txt | |
fi | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: | |
- black-check | |
- install-dependencies | |
if: github.repository == 'palp1tate/fetch-gushiwen' && github.event_name == 'push' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: -1 | |
- name: Setup Node.js | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: Fetch Previous version | |
id: get-previous-tag | |
uses: actions-ecosystem/[email protected] | |
- name: Release | |
run: yarn global add [email protected] && semantic-release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |