fix: expand actively_monitored_wells to include wells from all groups… #127
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-please | |
| on: | |
| push: | |
| branches: | |
| - production | |
| - staging | |
| - 'hotfix/v*' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.resolve_tag.outputs.tag_name }} | |
| steps: | |
| # staging uses its own config/manifest pair: prerelease (rc) versioning, | |
| # separate changelog, and its own version state so the rc line never | |
| # collides with the stable line tracked in .release-please-manifest.json. | |
| - id: release | |
| uses: googleapis/release-please-action@v5 | |
| with: | |
| config-file: ${{ github.ref_name == 'staging' && 'release-please-config.staging.json' || 'release-please-config.json' }} | |
| manifest-file: ${{ github.ref_name == 'staging' && '.release-please-manifest.staging.json' || '.release-please-manifest.json' }} | |
| target-branch: ${{ github.ref_name }} | |
| # release-please-action@v5 does not populate a usable `tag_name` output in | |
| # this manifest setup: it emits `release_created` plus an EMPTY `tag_name`, | |
| # and no path-scoped (`.--tag_name`) outputs exist. An empty tag makes | |
| # CD_production's `startsWith(inputs.tag_name, 'v')` gate silently skip the | |
| # deploy (and forward-merge get an empty tag). Resolve the tag ourselves | |
| # from the released version in the branch-appropriate manifest. Both | |
| # configs set include-v-in-tag: true, so the tag is `v<version>`. Prefer | |
| # the action's own output if it is ever non-empty. | |
| - if: ${{ steps.release.outputs.release_created == 'true' }} | |
| uses: actions/checkout@v7.0.1 | |
| - id: resolve_tag | |
| if: ${{ steps.release.outputs.release_created == 'true' }} | |
| env: | |
| ACTION_TAG: ${{ steps.release.outputs.tag_name }} | |
| MANIFEST: ${{ github.ref_name == 'staging' && '.release-please-manifest.staging.json' || '.release-please-manifest.json' }} | |
| run: | | |
| tag="$ACTION_TAG" | |
| if [ -z "$tag" ]; then | |
| version="$(jq -r '.["."]' "$MANIFEST")" | |
| if [ -z "$version" ] || [ "$version" = "null" ]; then | |
| echo "Could not resolve released version from $MANIFEST" >&2 | |
| exit 1 | |
| fi | |
| tag="v${version}" | |
| fi | |
| echo "Resolved release tag: $tag" | |
| echo "tag_name=${tag}" >> "$GITHUB_OUTPUT" | |
| # When release-please cuts a stable or hotfix release, deploy it. RC releases | |
| # on staging never deploy production. The release is created with | |
| # GITHUB_TOKEN, whose events don't trigger other workflows, so we invoke the | |
| # production deploy inline (same run) instead of relying on the | |
| # `release: published` event reaching CD_production. | |
| deploy-production: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' && github.ref_name != 'staging' }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/CD_production.yml | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| secrets: inherit | |
| # Keep branches converged after a release: | |
| # - stable release on production -> open PR production -> staging | |
| # (carries the release commit/tag history and syncs the staging manifest) | |
| # - hotfix release on hotfix/v* -> open PR hotfix/vX.Y.Z -> production | |
| forward-merge: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' && github.ref_name != 'staging' }} | |
| uses: ./.github/workflows/forward-merge.yml | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| source_branch: ${{ github.ref_name }} | |
| secrets: inherit |