Files
pdfme/scripts/determine-npm-tag.sh
Daniel Kastl ec81f4df4c Adds automated publishing workflow (#306)
Signed-off-by: Daniel Kastl <daniel@georepublic.de>
2023-11-03 16:56:22 +09:00

16 lines
422 B
Bash
Executable File

#!/bin/bash
# Get the tag from the GITHUB_REF environment variable
VERSION=${GITHUB_REF#refs/tags/}
# Determine the NPM tag based on the GitHub tag
if [[ $VERSION == *"-alpha"* ]]; then
echo "NPM_TAG=next" >> $GITHUB_ENV
elif [[ $VERSION == *"-beta"* ]]; then
echo "NPM_TAG=next" >> $GITHUB_ENV
elif [[ $VERSION == *"-rc"* ]]; then
echo "NPM_TAG=next" >> $GITHUB_ENV
else
echo "NPM_TAG=latest" >> $GITHUB_ENV
fi