Skip to content

Commit ddf2dab

Browse files
committed
Changed: release workflow
1 parent 82249a6 commit ddf2dab

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ jobs:
3333
3434
gh release create "$tag" \
3535
--title="$tag" \
36-
--draft \
3736
--generate-notes \
3837
main.js manifest.json styles.css

scripts/publish-release.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# Extract the version number from the package.json file
4+
VERSION=$(grep -Eo '"version": "[0-9]+\.[0-9]+\.[0-9]+"' package.json | cut -d '"' -f 4)
5+
6+
# Check if the version number was found
7+
if [ -z "$VERSION" ]; then
8+
echo "Version number not found in package.json."
9+
exit 1
10+
fi
11+
12+
# Ensure repo is up-to-date
13+
git pull
14+
15+
# Create an annotated tag
16+
git tag -a "$VERSION" -m "$VERSION"
17+
18+
# Push all tags to the repository
19+
git push --tags
20+
21+
echo "Tag $VERSION created and pushed to the repository."

0 commit comments

Comments
 (0)