Skip to content

Commit

Permalink
Run release procedure on tag pushes (#425)
Browse files Browse the repository at this point in the history
Running CI actions on tags requires tags to be explicitly listed per the
documentation in
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-branches-and-tags

Also update the logic to make sure we run on tags, not just on the main
branch pushes.
  • Loading branch information
TimvdLippe authored Mar 29, 2021
1 parent f4f4774 commit 00236e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
push:
branches:
- main
tags:
- 3.*
pull_request:
branches:
- main
Expand Down Expand Up @@ -78,7 +80,7 @@ jobs:
needs: [build] # build job must pass before we can release

if: github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/3.'))
&& github.repository == 'mockito/mockito-kotlin'
&& !contains(toJSON(github.event.commits.*.message), '[skip release]')

Expand Down

0 comments on commit 00236e8

Please sign in to comment.