Skip to content

Commit 36d21c9

Browse files
author
Thomas Rabaix
committed
feat(package): update package
1 parent 3f47159 commit 36d21c9

File tree

5 files changed

+20
-28
lines changed

5 files changed

+20
-28
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ master, main ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ master, main ]
7+
branches: [ main ]
88

99
jobs:
1010
test:

.github/workflows/release.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: Release
1+
name: Test Package
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
7-
- '[0-9]+.[0-9]+.[0-9]+'
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
89

910
jobs:
1011
test:
@@ -34,20 +35,4 @@ jobs:
3435
- name: Check package
3536
run: |
3637
twine check dist/*
37-
38-
- name: Publish to Test PyPI
39-
env:
40-
TWINE_USERNAME: __token__
41-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
42-
run: |
43-
twine upload --repository testpypi dist/*
44-
if: env.TWINE_PASSWORD != ''
45-
continue-on-error: true
46-
47-
- name: Publish to PyPI
48-
env:
49-
TWINE_USERNAME: __token__
50-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
51-
run: |
52-
twine upload dist/*
53-
if: env.TWINE_PASSWORD != '' && startsWith(github.ref, 'refs/tags/')
38+

.github/workflows/test-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Test Matrix
22

33
on:
44
push:
5-
branches: [ master, main ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ master, main ]
7+
branches: [ main ]
88

99
jobs:
1010
test-matrix:

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ master, main ]
5+
branches: [ main ]
66
pull_request:
7-
branches: [ master, main ]
7+
branches: [ main ]
88

99
jobs:
1010
lint:

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
all: build upload
22

33
build:
4+
pip install build twine
45
python -m build
6+
twine check dist/*
57

6-
upload:
8+
upload-prod: build
9+
export TWINE_USERNAME=__token__
710
python -m twine upload dist/*
811

12+
upload-test: build
13+
export TWINE_USERNAME=__token__
14+
python -m twine --repository testpypi upload dist/*
15+
916
clean:
1017
rm -rf build/ dist/ *.egg-info/ __pycache__/ .pytest_cache/ .mypy_cache/
1118
find . -type f -name "*.pyc" -delete

0 commit comments

Comments
 (0)