Skip to content

Commit 45ef587

Browse files
authored
Merge pull request #11 from BrainLesion/feature/lint-autoformat-actions
- add lint and format action
2 parents cf1c574 + f3b78ea commit 45ef587

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/autoformat.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: autoformat
2+
3+
on:
4+
issue_comment:
5+
types: [created, edited]
6+
jobs:
7+
run_autoformat:
8+
uses: BrainLesion/BrainLes/.github/workflows/autoformat.yml@main
9+
secrets: inherit

.github/workflows/pr-lint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
jobs:
8+
run_lint:
9+
uses: BrainLesion/BrainLes/.github/workflows/pr_lint.yml@main
10+
secrets: inherit

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
name: Publish to test PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.x"
19+
- name: Install dependencies
20+
run: |
21+
pip install build
22+
pip install twine
23+
- name: Build package
24+
run: python -m build
25+
- name: Upload to PyPI
26+
env:
27+
TWINE_USERNAME: __token__
28+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
29+
run: |
30+
twine upload dist/*.whl

0 commit comments

Comments
 (0)