File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 3333
3434 gh release create "$tag" \
3535 --title="$tag" \
36- --draft \
3736 --generate-notes \
3837 main.js manifest.json styles.css
Original file line number Diff line number Diff line change 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."
You can’t perform that action at this time.
0 commit comments