Skip to content

Commit cbc555c

Browse files
author
vapor-forensics
committed
dev
1 parent c2ca238 commit cbc555c

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
build-and-publish:
11+
name: Build and publish to PyPI
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build twine
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,7 @@ aws.credentials
173173
# Testing CSV files
174174
*.csv
175175
*.json
176-
*.json.gz
176+
*.json.gz
177+
178+
# Don't ignore GitHub workflows
179+
!.github/workflows/

0 commit comments

Comments
 (0)