Breaking Change: Optionalize Sklearn Package #159
This file contains 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: Merged to Prod | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- prod | |
jobs: | |
OpenRequest: | |
runs-on: ubuntu-latest | |
# If a merge request triggered the push, and that request DOESN'T contain the 'skip-release' label. | |
# (Need to check all three, instead of 'not skip-release', because if and admin overrides the tests, | |
# it might not have ANY labels at that point.). | |
if: > | |
github.event.pull_request.merged && | |
( | |
contains(github.event.pull_request.labels.*.name, 'patch') || | |
contains(github.event.pull_request.labels.*.name, 'minor') || | |
contains(github.event.pull_request.labels.*.name, 'major') | |
) | |
steps: | |
- name: debug info | |
run: | | |
echo "PR: ${GITHUB_REF}" | |
echo "Branch: ${{ github.base_ref }}" | |
- uses: actions/checkout@v2 | |
- name: Save version type | |
# Whichever one return's true, will let their 'echo' statement run: | |
# Must wrap in "(*) || true" to prevent it from exiting on failure, until | |
# 'allow-failure' is finished getting added: https://github.com/actions/toolkit/issues/399 | |
run: | | |
(${{ contains(github.event.pull_request.labels.*.name, 'patch') }} && echo "version_type=patch" >> $GITHUB_ENV) || true | |
(${{ contains(github.event.pull_request.labels.*.name, 'minor') }} && echo "version_type=minor" >> $GITHUB_ENV) || true | |
(${{ contains(github.event.pull_request.labels.*.name, 'major') }} && echo "version_type=major" >> $GITHUB_ENV) || true | |
- name: Create a Release | |
uses: zendesk/action-create-release@v1 | |
env: | |
# NOT built in token, so this can trigger other actions: | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
with: | |
# version_type populated with the last job just above ^^ | |
auto_increment_type: "${{ env.version_type }}" | |
tag_schema: semantic | |
draft: false | |
prerelease: false |