forked from meltano/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (81 loc) · 2.65 KB
/
version_bump.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Version bump
on:
workflow_dispatch:
inputs:
bump:
description: "Version bump type"
required: true
type: choice
default: auto
options:
- auto
- patch
- minor
- major
prerelease:
description: "Increase to this prerelease version"
required: false
type: choice
default: none
options:
- none
- alpha
- beta
- rc
jobs:
version_bump:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
permissions:
contents: write # to create a github release
pull-requests: write # to create and update PRs
steps:
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: "3.10"
architecture: x64
- name: Bump version
id: cz-bump
uses: commitizen-tools/commitizen-action@0.15.1
with:
increment: ${{ github.event.inputs.bump != 'auto' && github.event.inputs.bump || '' }}
prerelease: ${{ github.event.inputs.prerelease != 'none' && github.event.inputs.prerelease || '' }}
commit: "false"
push: "false"
changelog: "true"
github_token: ${{ secrets.MELTYBOT_GITHUB_AUTH_TOKEN }}
extra_requirements: 'git+https://github.com/meltano/commitizen-version-bump@main'
changelog_increment_filename: _changelog_fragment.md
- name: Draft Release
id: draft-release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: _changelog_fragment.md
tag_name: v${{ steps.cz-bump.outputs.version }}
prerelease: ${{ github.event.inputs.prerelease != 'none' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
id: create-pull-request
with:
commit-message: "chore: Bump package version"
title: "chore: Release v${{ steps.cz-bump.outputs.version }}"
body: |
Prepare MeltanoSDK `v${{ steps.cz-bump.outputs.version }}` for release.
Checklist:
- [ ] Check that the right version is set in all the files.
- [ ] Groom the changelog for wording or missing entries.
- [ ] Merge this PR once everything looks good.
[Release Draft](${{ steps.draft-release.outputs.url }})
branch: release/v${{ steps.cz-bump.outputs.version }}
base: main
labels: release
assignees: "${{ github.actor }}"
token: ${{ secrets.MELTYBOT_GITHUB_AUTH_TOKEN }}