Skip to content

feat(debug): add toolkit subcommand for deepgram/support-toolkit scripts #119

feat(debug): add toolkit subcommand for deepgram/support-toolkit scripts

feat(debug): add toolkit subcommand for deepgram/support-toolkit scripts #119

Workflow file for this run

name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
id: release
with:
token: ${{ github.token }}
config-file: .github/release-please-config.json
manifest-file: .github/.release-please-manifest.json
build:
name: Build packages
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
- name: Install build dependencies
run: pip install build twine
- name: Build all packages
run: make build
- name: Verify built packages
run: make verify-packages
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist
path: dist/
test:
name: Test installation
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist/
- name: Test installation
run: |
DIST_DIR=$(pwd)/dist
pip install --find-links "$DIST_DIR" dist/deepctl-*.whl
deepctl --version
mark-latest:
name: Mark root release as latest
needs: release-please
# Re-assert latest on the root package tag (vX.Y.Z) after all sub-package
# releases are created, since release-please processes them sequentially and
# a sub-package release created after the root tag can steal the pointer.
if: |
needs.release-please.outputs.release_created == 'true' &&
startsWith(needs.release-please.outputs.tag_name, 'v')
runs-on: ubuntu-latest
steps:
- name: Mark root release as latest
run: gh release edit "${{ needs.release-please.outputs.tag_name }}" --latest --repo "${{ github.repository }}"
env:
GH_TOKEN: ${{ github.token }}
deploy-web:
name: Deploy web to production
needs: release-please
# Only fire on root-package releases (v0.2.4, v1.0.0, …).
# Sub-package tags look like deepctl-cmd-listen-v0.0.3 — skip those.
if: |
needs.release-please.outputs.release_created == 'true' &&
startsWith(needs.release-please.outputs.tag_name, 'v')
uses: ./.github/workflows/web-production.yml
secrets: inherit
publish:
name: Publish to PyPI
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: dist/
skip-existing: true