GeezerVison is showing github.com — ci: stuff · steipete/opencode@ea0285a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/publish.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | name: publish |
2 | | -run-name: "${{ format('v{0}', inputs.version) }}" |
| 2 | +run-name: "${{ format('release {0}', inputs.bump) }}" |
3 | 3 |
|
4 | 4 | on: |
5 | 5 | workflow_dispatch: |
|
Collapse file
Copy file name to clipboard +1-40Lines changed: 1 addition & 40 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
3 | | -# Parse command line arguments |
4 | | -minor=false |
5 | | -while [ "$#" -gt 0 ]; do |
6 | | - case "$1" in |
7 | | - --minor) minor=true; shift 1;; |
8 | | - *) echo "Unknown parameter: $1"; exit 1;; |
9 | | - esac |
10 | | -done |
11 | | - |
12 | | -# Get the latest release from GitHub |
13 | | -latest_tag=$(gh release list --limit 1 --json tagName --jq '.[0].tagName') |
14 | | - |
15 | | -# If there is no tag, exit the script |
16 | | -if [ -z "$latest_tag" ]; then |
17 | | - echo "No tags found" |
18 | | - exit 1 |
19 | | -fi |
20 | | - |
21 | | -echo "Latest tag: $latest_tag" |
22 | | - |
23 | | -# Remove the 'v' prefix and split into major, minor, and patch numbers |
24 | | -version_without_v=${latest_tag#v} |
25 | | -IFS='.' read -ra VERSION <<< "$version_without_v" |
26 | | - |
27 | | -if [ "$minor" = true ]; then |
28 | | - # Increment the minor version and reset patch to 0 |
29 | | - minor_number=${VERSION[1]} |
30 | | - let "minor_number++" |
31 | | - new_version="${VERSION[0]}.$minor_number.0" |
32 | | -else |
33 | | - # Increment the patch version |
34 | | - patch_number=${VERSION[2]} |
35 | | - let "patch_number++" |
36 | | - new_version="${VERSION[0]}.${VERSION[1]}.$patch_number" |
37 | | -fi |
38 | | - |
39 | | -echo "New version: $new_version" |
40 | | - |
41 | | -gh workflow run publish.yml -f version="$new_version" |
42 | | - |
| 3 | +gh workflow run publish.yml -f bump="patch" |