mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Tag releases in master using CI (also checks for v0.x.0 instead of v0.x when deciding version numbers)
This commit is contained in:
parent
8ade7aed62
commit
a7f5c427d4
3 changed files with 19 additions and 4 deletions
|
@ -18,6 +18,8 @@ jobs:
|
|||
mkdir /tmp/upload
|
||||
echo 'export CINAME=$(sh contrib/semver/name.sh)' >> $BASH_ENV
|
||||
echo 'export CIVERSION=$(sh contrib/semver/version.sh | cut -c 2-)' >> $BASH_ENV
|
||||
git config --global user.email "$(git log --format='%ae' HEAD -1)";
|
||||
git config --global user.name "$(git log --format='%an' HEAD -1)";
|
||||
|
||||
- run:
|
||||
name: Install alien
|
||||
|
@ -98,3 +100,13 @@ jobs:
|
|||
- store_artifacts:
|
||||
path: /tmp/upload
|
||||
destination: /
|
||||
|
||||
- run:
|
||||
name: Create tags (master branch only)
|
||||
command: >
|
||||
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
||||
git tag -f -a $(sh contrib/semver/version.sh) -m "Created by CircleCI" && git push -f --tags;
|
||||
else
|
||||
echo "Only runs for master branch (this is ${CIRCLE_BRANCH})";
|
||||
fi;
|
||||
when: on_success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue