SAASINT-5771 Update release date and turn on public documentation for… #69
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: Trigger Wheel Builds | |
| # Thin wrapper — all tagging and dispatch logic lives in release-dispatch.yml. | |
| # The pipeline can build wheels for any Python package in the repo. | |
| # Equivalent trigger workflows exist in integrations-extras and marketplace. | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - "[0-9]+.[0-9]+.x" | |
| - "alpha/*" | |
| - "beta/*" | |
| - "rc/*" | |
| paths: | |
| - "*/CHANGELOG.md" | |
| - "*/datadog_checks/*/__about__.py" | |
| workflow_dispatch: | |
| inputs: | |
| packages: | |
| description: >- | |
| Packages to release. JSON array (e.g. '["postgres","datadog_checks_base"]'), | |
| or omit to auto-detect from tags pointing at the specified ref. | |
| required: false | |
| type: string | |
| source-repo-ref: | |
| description: "Commit SHA or ref to build from" | |
| required: true | |
| type: string | |
| source-repo-branch: | |
| description: "Branch that contains source-repo-ref, used to determine stable vs pre-release behavior" | |
| required: true | |
| type: string | |
| dry-run: | |
| description: "Print what would be released without pushing tags or starting builds" | |
| required: false | |
| type: boolean | |
| default: false | |
| ddev-version: | |
| description: "ddev version, pinned by default." | |
| required: false | |
| type: string | |
| jobs: | |
| context: | |
| name: Detect release context | |
| runs-on: ubuntu-latest | |
| outputs: | |
| is-stable-release: ${{ steps.detect.outputs.is-stable-release }} | |
| steps: | |
| - id: detect | |
| # Stable for master/X.Y.x, pre-release for alpha/beta/rc branches. | |
| # Manual dispatches use source-repo-branch instead of GITHUB_REF so the | |
| # release behavior follows the branch that contains source-repo-ref. | |
| env: | |
| RELEASE_BRANCH: ${{ github.event_name == 'workflow_dispatch' && inputs.source-repo-branch || github.ref_name }} | |
| run: | | |
| branch="${RELEASE_BRANCH#refs/heads/}" | |
| if [[ "$branch" =~ ^(master|[0-9]+\.[0-9]+\.x)$ ]]; then | |
| echo "is-stable-release=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "is-stable-release=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| # TODO: this notification currently runs before the approval gate, so it | |
| # announces a *pending* release. Once the `release` environment gate is removed | |
| # the release starts immediately — switch `needs` back to the release step and | |
| # update the wording in notify_release.py to "release starting". | |
| notify: | |
| name: Notify pending release | |
| needs: context | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # federate a Datadog app key via dd-sts | |
| contents: read | |
| steps: | |
| - name: Checkout notification script | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: .github/workflows/scripts | |
| - name: Get Datadog credentials | |
| id: dd-sts | |
| uses: DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0 | |
| with: | |
| policy: integrations-core | |
| - name: Notify pending release via Datadog workflow | |
| env: | |
| DD_API_KEY: ${{ steps.dd-sts.outputs.api_key }} | |
| DD_APP_KEY: ${{ steps.dd-sts.outputs.app_key }} | |
| DD_WORKFLOW_ID: 8f4e31b8-8a2a-4e46-a0c3-9a25c989108e | |
| SOURCE_REPO: integrations-core | |
| REF: ${{ github.event_name == 'workflow_dispatch' && inputs.source-repo-ref || github.sha }} | |
| PACKAGES: ${{ inputs.packages || '' }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| run: python3 .github/workflows/scripts/notify_release.py | |
| approve: | |
| name: Await release approval | |
| needs: context | |
| runs-on: ubuntu-latest | |
| environment: release | |
| steps: | |
| - run: echo "Release approved" | |
| dispatch: | |
| name: Release | |
| needs: [context, approve] | |
| uses: ./.github/workflows/release-dispatch.yml | |
| with: | |
| source-repo: integrations-core | |
| packages: ${{ inputs.packages || '' }} | |
| source-repo-ref: ${{ github.event_name == 'workflow_dispatch' && inputs.source-repo-ref || github.sha }} | |
| source-repo-branch: ${{ github.event_name == 'workflow_dispatch' && inputs.source-repo-branch || github.ref_name }} | |
| dry-run: ${{ inputs.dry-run || false }} | |
| ddev-version: ${{ inputs.ddev-version || '' }} | |
| is-stable-release: ${{ needs.context.outputs.is-stable-release }} | |
| permissions: | |
| id-token: write | |
| contents: read |