File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : Create a new release branch
2
2
on :
3
3
workflow_dispatch :
4
+ inputs :
5
+ kind :
6
+ description : Kind of release (major = v1.2.3 -> v2.0.0-rc.0, minor = v1.2.3 -> v1.3.0-rc.0)
7
+ required : true
8
+ type : choice
9
+ default : minor
10
+ options :
11
+ - major
12
+ - minor
4
13
5
14
jobs :
6
15
compute-version :
7
- name : Compute the next minor RC version
16
+ name : Compute the next ${{ inputs.kind }} RC version
8
17
runs-on : ubuntu-24.04
9
18
10
19
permissions :
27
36
28
37
- name : Compute the new minor RC
29
38
id : next
39
+ env :
40
+ BUMP : pre${{ inputs.kind }}
30
41
run : |
31
42
CURRENT_VERSION="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "mas-cli") | .version')"
32
- NEXT_VERSION="$(npx --yes semver@7.5.4 -i preminor --preid rc "${CURRENT_VERSION}")"
43
+ NEXT_VERSION="$(npx --yes semver@7.5.4 -i "$BUMP" --preid rc "${CURRENT_VERSION}")"
33
44
# compute the short minor version, e.g. 0.1.0-rc.1 -> 0.1
34
45
SHORT_VERSION="$(echo "${NEXT_VERSION}" | cut -d. -f1-2)"
35
46
echo "full=${NEXT_VERSION}" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments