-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from daxa-ai/sid-build-publish
added changes for building and publishing the package on pypi
- Loading branch information
Showing
1 changed file
with
60 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
|
||
name: Build Package And publish on PyPi | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: build_distribution | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11.x" | ||
- name: Install pypa/build | ||
run: | | ||
pip install build | ||
python -m build --wheel | ||
ls -la | ||
ls -la dist/ | ||
- name: Store the distribution packages | ||
uses: actions/[email protected] | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
release-on-pypi: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/daxa | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/[email protected] | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Build and Upload to Test PyPI | ||
run: | | ||
pip install twine | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }} | ||
|
||
# - name: Publish Daxa Distribution to TestPyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# repository-url: https://test.pypi.org/legacy/ | ||
# packages-dir: pebblo/dist/ |