summaryrefslogtreecommitdiff
path: root/.github/workflows/prepare-release-pr.yml
blob: dec3523643045ffab245b75fc40be81867b42510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: prepare release pr

on:
  workflow_dispatch:
    inputs:
      branch:
        description: 'Branch to base the release from'
        required: true
        default: ''
      major:
        description: 'Major release? (yes/no)'
        required: true
        default: 'no'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: "3.8"

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install --upgrade setuptools tox

    - name: Prepare release PR (minor/patch release)
      if: github.event.inputs.major == 'no'
      run: |
        tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ secrets.chatops }}

    - name: Prepare release PR (major release)
      if: github.event.inputs.major == 'yes'
      run: |
        tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ secrets.chatops }} --major