Skip to content

Commit 03e701f

Browse files
fix: allow GitHub workflows in .gitignore
1 parent de74618 commit 03e701f

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

.github/workflows/publish.yml

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

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ deployments/
212212
*.service
213213

214214
# GitHub
215-
.github/
216-
.github/workflows/
217-
.github/workflows/*.yml
218-
.github/workflows/*.yaml
215+
.github/*
216+
!.github/workflows/
217+
!.github/workflows/*.yml
218+
!.github/workflows/*.yaml
219219

220220
# Fichiers de configuration spécifiques
221221
.pre-commit-config.yaml

0 commit comments

Comments
 (0)