Skip to content

Commit 16faa98

Browse files
committed
Extract the version from $GITHUB_REF
$GITHUB_REF is something like "refs/tags/1.6.2" and we need to take only the last part of it.
1 parent c1ccee5 commit 16faa98

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/bin/sh -l
22

3-
echo "Trying to publish orb with version ${GITHUB_REF}"
4-
circleci orb publish source.yml "nebulab/feature-branch-preview@${GITHUB_REF}" --token $CIRCLECI_TOKEN
3+
# $GITHUB_REF is something like "refs/tags/1.6.2" and we need to take
4+
# only the last part of it.
5+
version=${GITHUB_REF/refs\/tags\//}
6+
7+
echo "Trying to publish orb with version ${version}"
8+
circleci orb publish source.yml "nebulab/feature-branch-preview@${version}" --token $CIRCLECI_TOKEN

0 commit comments

Comments
 (0)