Release Action #17
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 Action | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: # for testing | |
jobs: | |
publish-package: | |
runs-on: ubuntu-latest | |
name: Publish to PyPI | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Initialize pants | |
uses: pantsbuild/actions/init-pants@main | |
with: | |
gha-cache-key: cache0-py3.13 | |
named-caches-hash: ${{ hashFiles('requirements.txt') }} | |
- name: Publish to PyPI | |
run: "pants publish ::" | |
env: | |
PANTS_PYPI_REPOSITORY: pypi | |
PANTS_PYPI_USERNAME: __token__ | |
PANTS_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
# notify-release: | |
# runs-on: ubuntu-latest | |
# name: Notify Release | |
# strategy: | |
# matrix: | |
# url: [SLACK_WEBHOOK_ASK_DEVREL_URL, SLACK_WEBHOOK_DEVREL_TOOLING_URL, SLACK_WEBHOOK_DEVREL_PRIVATE_URL] | |
# steps: | |
# - name: Send to slack channels | |
# uses: slackapi/slack-github-action@v2.0.0 | |
# if: always() | |
# continue-on-error: true | |
# with: | |
# webhook: ${{ secrets[matrix.url]}} | |
# webhook-type: incoming-webhook | |
# errors: true | |
# payload: | | |
# blocks: | |
# - type: "header" | |
# text: | |
# type: "plain_text" | |
# text: ":initial_external_notification_sent: :python: Version ${{ github.event.release.name }} of the Python SDK has been released" | |
# - type: "section" | |
# text: | |
# type: "mrkdwn" | |
# text: "${{ github.event.release.body }}" | |
# - type: "divider" | |
# - type: "section" | |
# text: | |
# type: "mrkdwn" | |
# text: "You can view the full change log <${{github.event.release.html_url }}|here>" |