File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release (TestPyPI)
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ build :
8+ name : Build sdist and wheel
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Set up uv
14+ uses : astral-sh/setup-uv@v5
15+ with :
16+ enable-cache : true
17+
18+ - name : Set up Python
19+ run : uv python install 3.12
20+
21+ - name : Show package version
22+ run : |
23+ VERSION="$(uv run python -c 'import tomllib; print(tomllib.loads(open("pyproject.toml","rb").read().decode())["project"]["version"])')"
24+ echo "Publishing version: ${VERSION}"
25+ echo "::notice title=TestPyPI version::${VERSION}"
26+
27+ - name : Build
28+ run : uv build
29+
30+ - name : Validate distributions
31+ run : uvx twine check dist/*
32+
33+ - name : Upload distributions
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : dist-testpypi
37+ path : dist/
38+ retention-days : 7
39+
40+ publish :
41+ name : Publish to TestPyPI
42+ needs : build
43+ runs-on : ubuntu-latest
44+ environment :
45+ name : testpypi
46+ url : https://test.pypi.org/p/datamasque-python
47+ permissions :
48+ id-token : write
49+ contents : read
50+ steps :
51+ - name : Download distributions
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : dist-testpypi
55+ path : dist/
56+
57+ - name : Publish to TestPyPI
58+ uses : pypa/gh-action-pypi-publish@release/v1
59+ with :
60+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments