Skip to content

Commit c7462e3

Browse files
committed
updated github workflows
1 parent 6576b7c commit c7462e3

3 files changed

Lines changed: 32 additions & 32 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
name: Lint and test
1+
name: Run linters and tests
22

33
on:
44
push:
5+
pull_request:
56

67
permissions:
78
pull-requests: read

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v4
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.x"
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install build twine
21+
- name: Update version number
22+
run: |
23+
sed -i 's/version = ".*"/version = "${{ github.ref_name }}"/' pyproject.toml
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
27+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
28+
run: |
29+
python -m build
30+
twine upload dist/*

.github/workflows/python-publish.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)