Skip to content

Commit f36b20b

Browse files
authored
Lovisa/publish (#6)
1 parent 04a1326 commit f36b20b

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

Diff for: .github/workflows/publish.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,30 @@ jobs:
1616
with:
1717
python-version: '3.6'
1818

19-
- name: Install dependencies
20-
run: make build
21-
2219
- name: Run tests
2320
env:
2421
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
2522
run: make test
2623

27-
- name: Publish to PyPi
28-
run: make publish
24+
- name: Install pypa/build
25+
run: >-
26+
python -m
27+
pip install
28+
build
29+
--user
30+
31+
- name: Build a binary wheel and a source tarball
32+
run: >-
33+
python -m
34+
build
35+
--sdist
36+
--wheel
37+
--outdir dist/
38+
.
2939
40+
- name: Publish a Python distribution to PyPI
41+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
42+
uses: pypa/gh-action-pypi-publish@master
43+
with:
44+
user: __token__
45+
password: ${{ secrets.PYPI_API_TOKEN }}

Diff for: .pypirc

-3
This file was deleted.

Diff for: Makefile

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SHELL = /bin/bash
22

33
build:
4-
pip install -r requirements.txt \
4+
pip install -r requirements.txt && \
55
python setup.py install
66

77
lint:
@@ -12,8 +12,4 @@ test:
1212
pip install -r requirements.txt && \
1313
python -m unittest discover test/
1414

15-
publish:
16-
python3 -m pip install --user --upgrade twine && \
17-
python3 -m twine upload -r pypi dist/* --config-file .pypirc
18-
19-
.PHONY: build test lint publish
15+
.PHONY: build lint test publish

0 commit comments

Comments
 (0)