This repository was archived by the owner on May 24, 2025. It is now read-only.
Update packages #31
This file contains hidden or 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: Build, Lint & Publish | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=300 --statistics | |
- name: Ensuring code is working as expected | |
working-directory: .github/workflows | |
run: | | |
python workflow.py | |
- name: Zip repo files | |
uses: papeloto/action-zip@v1.2 | |
with: | |
files: . '!./.git/**/*' | |
dest: release.zip | |
- name: Publish code | |
id: create_release | |
uses: softprops/action-gh-release@v2.0.4 | |
with: | |
files: release.zip | |
name: "Release v3.${{ github.run_number }}" | |
body: "Commit: ${{ github.sha }}\nDownload the `release.zip` file and you are good to go!\nContinue by following the steps given in the README." | |
tag_name: ${{ github.ref_name }} |