Publish to npm using a GitHub action (#9588)
This commit is contained in:
@@ -5,16 +5,8 @@ set -e
|
||||
echo "INFO: Installing action dependencies..."
|
||||
(cd /action; npm ci)
|
||||
|
||||
# GitHub doesn't support running actions on new tags yet: we need to run it on the commit.
|
||||
# For this reason, we can't be sure that the tag already exists. We can use the commit
|
||||
# message to create the tag. If the tag already exists locally, they won't conflict because
|
||||
# they have the same name and are on the same commit.
|
||||
echo "INFO: Getting release version..."
|
||||
# current_tag=$(git describe --abbrev=0 --tags $GITHUB_SHA)
|
||||
current_tag=$(git log --oneline --format=%B -1 $GITHUB_SHA)
|
||||
|
||||
echo "INFO: Creating new tag..."
|
||||
(git tag $current_tag $GITHUB_SHA) || echo "INFO: Tag already exists"
|
||||
current_tag=$(git describe --abbrev=0 --tags $GITHUB_SHA)
|
||||
|
||||
last_tag=$(git describe --abbrev=0 --tags $current_tag^)
|
||||
echo "INFO: New version is $current_tag; last version is $last_tag."
|
||||
|
||||
Reference in New Issue
Block a user