Release 26.1.0 #21
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| release: | |
| types: [released] | |
| jobs: | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # needed to publish to PyPI | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Build | |
| run: | | |
| python -m build | |
| - name: Test the Build | |
| run: | | |
| python -m pip install . # to install dependencies | |
| python -m pip uninstall -y kili | |
| python -m pip install --find-links=dist --no-index kili | |
| python -c 'from kili.client import Kili; k=Kili(); print("Everything OK!")' | |
| env: | |
| KILI_API_ENDPOINT: https://staging.cloud.kili-technology.com/api/label/v2/graphql | |
| KILI_API_KEY: ${{ secrets.KILI_USER_API_KEY_STAGING }} | |
| - name: Make sure we are on a tag | |
| run: | | |
| if [[ ${{ github.ref }} == refs/tags/* ]]; then | |
| echo "We are on a tag" | |
| else | |
| echo "We are not on a tag" | |
| exit 1 | |
| fi | |
| - name: Publish to PyPI | |
| uses: pypa/[email protected] | |
| with: | |
| verbose: true | |
| - name: Slack notification | |
| id: slack | |
| if: success() | |
| uses: slackapi/[email protected] | |
| with: | |
| payload: | | |
| { | |
| "text": "Kili SDK ${{ github.ref_name }} released!\nGitHub: https://github.com/kili-technology/kili-python-sdk/releases\nPyPI: https://pypi.org/project/kili/", | |
| "blocks": [ | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": "Kili SDK ${{ github.ref_name }} released!\nGitHub: https://github.com/kili-technology/kili-python-sdk/releases\nPyPI: https://pypi.org/project/kili/" | |
| } | |
| } | |
| ] | |
| } | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_PYTHON_SDK }} | |
| SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
| - name: Set git identity | |
| run: | | |
| git config user.name github-actions | |
| git config user.email [email protected] | |
| deploy-documentation: | |
| uses: ./.github/workflows/deploy_doc.yml | |
| needs: [publish] # Run after the previous job | |
| secrets: | |
| SLACK_WEBHOOK_URL_PYTHON_SDK: ${{ secrets.SLACK_WEBHOOK_URL_PYTHON_SDK }} |