separate script

This commit is contained in:
Bryce Thorup
2023-12-15 06:17:44 -07:00
parent d1d661b55c
commit 881af76500
2 changed files with 10 additions and 7 deletions

9
action Executable file
View File

@@ -0,0 +1,9 @@
apt update
apt install jq -y
CURRENT_VERSION=$(jq -r .version package.json)
PREVIOUS_VERSIONS=$(git tag -l)
if [[ $PREVIOUS_VERSIONS =~ (^|[[:space:]])$CURRENT_VERSION($|[[:space:]]) ]]; then
git tag -a -m "Version $(CURRENT_VERSION)" $CURRENT_VERSION
git push --follow-tags
fi

View File

@@ -9,10 +9,4 @@ runs:
using: composite
steps:
- run: Ensure apt is up-to-date
shell: apt update
- run: Get jq command
shell: apt install jq -y
- run: Get version from package.json
shell: export CURRENT_VERSION=$(jq -r .version package.json)
- run: Get tagged versions from git
shell: export PREVIOUS_VERSIONS=$(git tag -l)
shell: action