-
Notifications
You must be signed in to change notification settings - Fork 13
66 lines (61 loc) · 1.58 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Bharat OCR
on:
workflow_call:
workflow_dispatch:
push:
branches: [main, dev, release, staging]
pull_request:
branches: [main, dev, release, staging]
jobs:
spell_check:
runs-on: ubuntu-latest
steps:
- name: Check out Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install codespell
run: |
pip install codespell
codespell #--skip=".git,./scripts/lambda/packages"
continue-on-error: false
black_check:
runs-on: ubuntu-latest
steps:
- name: Check out Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install black
run: |
pip install black
black . --check
continue-on-error: false
password_check:
runs-on: ubuntu-latest
steps:
- name: Check out HEAD
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Check for password
uses: AlicanAkkus/[email protected]
publish_to_pypi:
runs-on: ubuntu-latest
steps:
- name: Check out HEAD
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
if: ${{ github.ref_name == 'main' }}
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}