-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add publish task to check if package builds properly
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,33 @@ jobs: | |
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps for running tests and analysis. | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
submodules: recursive | ||
|
||
- name: Install a specific version of uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
version: "0.4.x" | ||
enable-cache: true | ||
|
||
- name: Install Python 3.12 | ||
run: uv python install 3.12 | ||
|
||
- name: Build package | ||
run: uv build | ||
|
||
- name: Check package can be imported | ||
run: uv run --with dist/dtspy-*-py3-none-any.whl --no-project -- python -c "import dts" | ||
|
||
# when ready to upload to PyPI | ||
# name: upload to PyPI | ||
# run: uv publish |