Skip to content

Commit 7861c22

Browse files
committed
feat: add publish action
1 parent fe566fd commit 7861c22

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/release.yaml

+28
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

+1-1
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)