Skip to content

Commit 4fdebeb

Browse files
committed
docs: add RELEASING.md
1 parent 395d680 commit 4fdebeb

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.github/workflows/spellcheck.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
paths:
77
- "__posts/**"
88
- "README.md"
9+
- "RELEASING.md"
910
push:
1011
branches:
1112
- main
1213
paths:
1314
- "__posts/**"
1415
- "README.md"
16+
- "RELEASING.md"
1517

1618
permissions:
1719
contents: read

.pyspelling.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ matrix:
2525
sources:
2626
- "__posts/**/*.md"
2727
- "README.md"
28+
- "RELEASING.md"

RELEASING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Releasing
2+
3+
These are the general steps to release a new package version:
4+
5+
1. Run the following command `just prep-release`
6+
2. Open a pull request with the changes.
7+
3. Once the pull request is merged the Continuous Delivery workflow will build the release version, create the tag and create a draft [Github release](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases) with the website and change notes.
8+
4. Review the draft GitHub release and, if everything is ok, release it.

justfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,37 @@ test:
4949
test-ui:
5050
npm run test-ui
5151

52+
# Prepare for a new release
53+
pre-release:
54+
#!/usr/bin/env bash
55+
set -e
56+
57+
if [[ -n $(git status --porcelain) ]]; then
58+
echo "Git working directory is not clean. Please commit or stash your changes."
59+
exit 1
60+
fi
61+
62+
echo "Running checks and tests..."
63+
just check
64+
just test
65+
just test-ui
66+
67+
current_version=$(node -p "require('./package.json').version")
68+
echo "Current version is ${current_version}"
69+
70+
if [[ $current_version != *"-SNAPSHOT"* ]]; then
71+
echo "Error: Current version is not a SNAPSHOT version."
72+
exit 1
73+
fi
74+
75+
new_version=$(echo ${current_version} | sed 's/-SNAPSHOT//')
76+
echo "Bumping version to ${new_version}..."
77+
npm version --no-git-tag-version ${new_version}
78+
79+
echo "Committing version bump..."
80+
git add package.json package-lock.json
81+
git commit -m "chore(release): prepare for release v${new_version}"
82+
83+
echo "Pre-release for version ${new_version} is ready."
84+
echo "You can now push the changes to trigger the release workflow."
85+

0 commit comments

Comments
 (0)