File tree Expand file tree Collapse file tree 1 file changed +27
-20
lines changed Expand file tree Collapse file tree 1 file changed +27
-20
lines changed Original file line number Diff line number Diff line change 1
1
name : Test Release
2
2
3
3
on :
4
- workflow_run :
5
- workflows : ["CI"]
6
- types :
7
- - completed
4
+ push :
5
+ branches :
6
+ - main
8
7
9
8
jobs :
10
- test-release :
11
- name : Build and Publish to TestPyPI
12
- if : ${{ github.event.workflow_run.conclusion == 'success' }}
9
+ sanity-check :
10
+ name : Build and Verify Artifacts
11
+ needs : ci
13
12
runs-on : ubuntu-latest
14
13
15
14
steps :
16
- - uses : actions/checkout@v4
15
+ - name : Checkout code
16
+ uses : actions/checkout@v4
17
17
18
18
- name : Set up Python
19
19
uses : actions/setup-python@v5
20
20
with :
21
- python-version : ' 3.11'
21
+ python-version : " 3.11"
22
22
23
23
- name : Install Poetry
24
24
run : |
25
25
curl -sSL https://install.python-poetry.org | python3 -
26
26
echo "$HOME/.local/bin" >> $GITHUB_PATH
27
27
28
- - name : Configure Poetry for TestPyPI
28
+ - name : Build package
29
29
run : |
30
- poetry config repositories.testpypi https://test.pypi.org/legacy/
31
- poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_API_TOKEN }}
32
-
33
- - name : Install dependencies
34
- run : poetry install --only main
30
+ poetry install --no-root
31
+ poetry build
35
32
36
- - name : Build and verify package
33
+ - name : Check artifacts with twine
37
34
run : |
38
- poetry build
39
- pip install --upgrade build twine
35
+ pip install twine
40
36
twine check dist/*
41
37
42
- - name : Publish to TestPyPI
43
- run : poetry publish -r testpypi --skip-existing
38
+ - name : Create test venv and install package
39
+ run : |
40
+ python -m venv testenv
41
+ source testenv/bin/activate
42
+ pip install dist/*.whl
43
+
44
+ python -c "import dstools"
45
+
46
+ dstools-extract-ds --help || echo "No CLI tool found"
47
+
48
+ - name : Clean up
49
+ if : always()
50
+ run : rm -rf testenv
You can’t perform that action at this time.
0 commit comments