Skip to content

Commit 5f11579

Browse files
authored
Merge pull request #8 from DavidStirling/compat-4-2-actions
New build system
2 parents f9f1602 + 8bf4019 commit 5f11579

File tree

2 files changed

+28
-87
lines changed

2 files changed

+28
-87
lines changed

.github/workflows/test.yml

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

.github/workflows/upload.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
1-
name: Upload
1+
name: Build
22
on:
3-
release:
4-
types: [created]
3+
push:
4+
pull_request:
5+
56
jobs:
6-
deploy:
7+
build:
8+
name: Build
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/checkout@v2
10-
- name: Setup Python
11-
uses: actions/setup-python@v1
12-
with:
13-
python-version: '3.x'
14-
- name: Install dependencies
15-
run: |
16-
python -m pip install --upgrade pip
17-
pip install setuptools wheel twine
18-
- name: Upload
19-
env:
20-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
21-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
22-
run: |
23-
python setup.py sdist bdist_wheel
24-
twine upload dist/*
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.8'
15+
- name: Build package
16+
run: |
17+
git fetch --prune --unshallow --tags --force
18+
python -m pip install --upgrade pip
19+
python -m pip install setuptools wheel
20+
python setup.py sdist bdist_wheel
21+
- name: Artifact upload
22+
uses: actions/upload-artifact@v4
23+
with:
24+
path: dist/*.whl
25+
retention-days: 30
26+
- name: Create release
27+
if: startsWith(github.ref, 'refs/tags/')
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
files: dist/*.whl
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)