Skip to content

Commit 6680469

Browse files
authored
Merge pull request #14 from thedadams/add-publish-action
feat: add publish action
2 parents fe566fd + 7861c22 commit 6680469

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/release.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Push to pypi
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements.txt
21+
- name: Build package
22+
run: ./scripts/package
23+
- name: Publish package
24+
run: |
25+
twine upload dist/*
26+
env:
27+
TWINE_USERNAME: __token__
28+
TWINE_PASSWORD: ${{ secrets.PYPI_KEY }}

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- uses: actions/checkout@v4
4242
with:
4343
fetch-depth: 1
44-
ref: ${{ github.event.pull_request.head.sha }}
44+
ref: ${{ github.event.pull_request.head.sha }}
4545
- uses: actions/setup-python@v5
4646
with:
4747
python-version: "3.10"

0 commit comments

Comments
 (0)