File tree Expand file tree Collapse file tree 1 file changed +30
-20
lines changed Expand file tree Collapse file tree 1 file changed +30
-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
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
28
+ - name : Ensure ~/.casa/data exists
29
+ run : mkdir -p ~/.casa/data
35
30
36
- - name : Build and verify package
31
+ - name : Build package
37
32
run : |
33
+ poetry install --no-root
38
34
poetry build
39
- pip install --upgrade build twine
35
+
36
+ - name : Check artifacts with twine
37
+ run : |
38
+ pip install twine
40
39
twine check dist/*
41
40
42
- - name : Publish to TestPyPI
43
- run : poetry publish -r testpypi --skip-existing
41
+ - name : Create test venv and install package
42
+ run : |
43
+ python -m venv testenv
44
+ source testenv/bin/activate
45
+ pip install dist/*.whl
46
+
47
+ python -c "import dstools"
48
+
49
+ dstools-extract-ds --help || echo "No CLI tool found"
50
+
51
+ - name : Clean up
52
+ if : always()
53
+ run : rm -rf testenv
You can’t perform that action at this time.
0 commit comments