-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squelette pour de futurs publish automatiques sur pypi (#102)
* Test publish sur pypi * remove tag * cartiflette url * clean * pin version * update * try token
- Loading branch information
1 parent
9902db9
commit 2e38b5f
Showing
2 changed files
with
63 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,58 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'pypi' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release-build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 # Ensure actions are pinned properly | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Build release distributions | ||
run: | | ||
python -m pip install build | ||
python -m build | ||
- name: Upload distributions | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- release-build | ||
|
||
permissions: | ||
id-token: write | ||
contents: read # Added this permission | ||
|
||
environment: | ||
name: publish | ||
url: https://pypi.org/p/cartiflette | ||
|
||
steps: | ||
- name: Retrieve release distributions | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: release-dists | ||
path: dist/ | ||
|
||
- name: Publish release distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} # Ensure the secret name is correct |
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
from cartiflette.api import download_from_cartiflette_inner | ||
|
||
print("This is an experimental version of cartiflette published on PyPi.") | ||
print("To use the latest stable version, you can install it directly from GitHub with the following command:") | ||
print("pip install git+https://github.com/inseeFrLab/cartiflette.git") | ||
|
||
|
||
carti_download = download_from_cartiflette_inner | ||
|
||
__all__ = ["carti_download"] |