Skip to content

Commit ea0285a

Browse files
committed
ci: stuff
1 parent 6960408 commit ea0285a

2 files changed

Lines changed: 2 additions & 41 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: publish
2-
run-name: "${{ format('v{0}', inputs.version) }}"
2+
run-name: "${{ format('release {0}', inputs.bump) }}"
33

44
on:
55
workflow_dispatch:

script/release

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,3 @@
11
#!/usr/bin/env bash
22

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"

0 commit comments

Comments
 (0)