Skip to content

Commit be60421

Browse files
committed
feat: add bot stuff
1 parent f8ce319 commit be60421

File tree

1 file changed

+64
-1
lines changed

1 file changed

+64
-1
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,76 @@ jobs:
4848

4949
- name: Install semantic-release
5050
run: pip install python-semantic-release
51+
52+
name: CI and Release
53+
54+
on:
55+
push:
56+
branches: [main]
57+
pull_request:
58+
branches: [main]
59+
60+
jobs:
61+
ci:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Set up Python
67+
uses: actions/setup-python@v5
68+
with:
69+
python-version: '3.9'
70+
cache: 'pip'
71+
72+
- name: Install dependencies
73+
run: |
74+
python -m pip install --upgrade pip
75+
pip install -e .[dev] # Assumes dev dependencies in pyproject.toml
76+
77+
- name: Run linting
78+
run: flake8 tqdm_pandas/ --max-line-length=110 --ignore=E203,W503,W293,E231,E501,W291,W292 || true
79+
continue-on-error: true
80+
81+
- name: Run tests
82+
run: pytest # Remove when you have actual tests
83+
84+
release:
85+
needs: ci
86+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
87+
runs-on: ubuntu-latest
88+
concurrency: release
89+
permissions:
90+
id-token: write
91+
contents: write
92+
steps:
93+
- uses: actions/checkout@v4
94+
with:
95+
fetch-depth: 0
96+
token: ${{ secrets.GITHUB_TOKEN }}
97+
98+
- name: Set up Python
99+
uses: actions/setup-python@v5
100+
with:
101+
python-version: '3.9'
102+
103+
- name: Install semantic-release
104+
run: pip install python-semantic-release
105+
106+
- name: Install build tools
107+
run: pip install build twine
108+
109+
- name: Configure Git
110+
run: |
111+
git config --global user.name "github-actions[bot]"
112+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
51113
52-
- name: Release
114+
- name: Semantic release
53115
env:
54116
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55117
run:
56118
semantic-release --version
57119
semantic-release publish
120+
58121
- name: Build and publish to PyPI
59122
env:
60123
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)