-
Notifications
You must be signed in to change notification settings - Fork 54
72 lines (69 loc) · 2.39 KB
/
_bump-version.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
name: "Bump version"
on:
workflow_call:
inputs:
package:
description: "Choose the package to bump"
type: string
required: true
branch:
description: "Choose the branch to use"
type: string
default: "main"
version:
description: "Choose the version to bump to (e.g. 1.2.3rc1, patch, release)"
type: string
default: "beta"
secrets:
FISHTOWN_BOT_PAT:
description: "Token to commit/merge changes into branches"
required: true
workflow_dispatch:
inputs:
package:
description: "Choose the package to bump"
type: choice
options:
- "dbt-adapters"
- "dbt-tests-adapter"
- "dbt-athena"
- "dbt-bigquery"
- "dbt-postgres"
- "dbt-redshift"
- "dbt-snowflake"
- "dbt-spark"
branch:
description: "Choose the branch to use"
type: string
default: "main"
version:
description: "Choose the version to bump to (e.g. 1.2.3rc1, patch, release)"
type: string
default: "beta"
secrets:
FISHTOWN_BOT_PAT:
description: "Token to commit/merge changes into branches"
required: true
permissions:
contents: write
jobs:
main:
runs-on: ${{ vars.DEFAULT_RUNNER }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- uses: actions/setup-python@v5
with:
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}
- uses: pypa/hatch@install
- id: version
run: |
echo "initial=$(hatch version)" >> $GITHUB_OUTPUT
hatch version ${{ inputs.version }}
echo "final=$(hatch version)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ./${{ inputs.package }}
- uses: ./.github/actions/bot-commit
with:
message: "Bump version from ${{ steps.version.outputs.initial }} to ${{ steps.version.outputs.final }}"