Release version 0.1.151 #136
Workflow file for this run
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
name: Publish SDK | |
on: | |
release: | |
types: [ published ] | |
env: | |
PYTHON: 3.8 | |
POETRY: 1.8.3 | |
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
concurrency: | |
group: cord-client-${{ github.ref }}-publish | |
cancel-in-progress: true | |
jobs: | |
publish-sdk: | |
name: Publish SDK | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON }} | |
- name: Setup Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY }} | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
run: | | |
poetry install --no-interaction | |
- name: Build SDK | |
run: poetry build | |
- name: Publish SDK | |
run: | | |
poetry config pypi-token.pypi ${{ env.PYPI_TOKEN }} | |
poetry publish | |
send-slack-notification: | |
name: Send notification | |
runs-on: ubuntu-20.04 | |
needs: [ publish-sdk ] | |
if: always() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get workflow status | |
uses: technote-space/workflow-conclusion-action@v2 | |
- name: Send Slack notification | |
uses: ./.github/actions/send-slack-notification | |
with: | |
success-parameter: ${{ env.WORKFLOW_CONCLUSION }} | |
success-channel: ${{ secrets.SLACK_DEPLOYMENT_PROD_CHANNEL_ID }} | |
failure-channel: ${{ secrets.SLACK_FAILURE_CHANNEL_ID }} | |
success-message: Deployed to https://pypi.org/project/encord/ | |
failure-message: This pipeline has failed! |