Menu

We added one condition to our release notes step and every push to every branch emailed forty partners
📰

We added one condition to our release notes step and every push to every branch emailed forty partners

DEV Community: cicd·Sergey Shinder·14 days ago
#5aIYn2QY
#devtocicd#devto#dev#github#tags
Long article (396 words) — no AI summary yet.
Reading 0:00
15s threshold

Our integration platform has forty partners who receive an email whenever we tag a release, with the notes generated from merged pull requests. The step lives in the same GitHub Actions workflow that builds and tests every push, and for a year it carried a single condition: if: ${{ startsWith(github.ref, 'refs/tags/v') }}.

In October a colleague wanted the email to go out only for tags pushed by hand, not for tags created by a re-run. He extended the line to if: ${{ startsWith(github.ref, 'refs/tags/v') }} && ${{ github.event_name == 'push' }}. It looked right, it read right, and two of us approved it.

The next morning a partner asked why they had received twenty three release announcements since nine o'clock, for versions that did not exist, listing work that was still on feature branches.

GitHub evaluates an if field as an expression. When the value contains ${{ }} with other text around it, the runner does not treat the whole thing as one expression.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.