Skip to content

Commit 2eadf1b

Browse files
committed
update release workflow
1 parent 41e0d4a commit 2eadf1b

File tree

2 files changed

+47
-64
lines changed

2 files changed

+47
-64
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Stage Build
2+
3+
on:
4+
push:
5+
branches:
6+
- update-workflow-for-pypi
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.11
23+
24+
- name: Install dependencies
25+
run: sudo apt-get install make
26+
27+
- name: Create virtual environment
28+
run: make venv
29+
30+
- name: Build package
31+
run: |
32+
set -x
33+
source venv/bin/activate
34+
rm -rf build dist *.egg-info
35+
make build ENV=stage
36+
37+
- name: Install Twine
38+
run: |
39+
source venv/bin/activate
40+
pip install twine
41+
42+
- name: Upload to PyPI
43+
env:
44+
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
45+
run: |
46+
source venv/bin/activate
47+
twine upload dist/* -u __token__ -p $PYPI_API_TOKEN

.github/workflows/release_stage.yml

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

0 commit comments

Comments
 (0)