Files
netdisco/.circleci/config.yml
Oliver Gorwits 96dbd7d15e fix project dir
2018-01-21 21:51:04 +00:00

26 lines
812 B
YAML

version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.4.1
branches:
only:
- master
steps:
- checkout
- run:
name: Call GitHub Releases API
command: |
cd /home/circleci/project
TAG=$(git tag -l | grep -E '^2\.[0-9]{6}' | sort -gr | head -n1 | sed -E 's/\.[0-9]{3}$//')
if [ ! -z "$TAG" ]; then
for url in $(echo $RELEASE_INJECTION | sed "s/,/ /g"); do
curl -sL -X POST -H "Content-Type: application/json" \
-u "$ACCESS_TOKEN" \
--data "{\"tag_name\": \"$TAG\", \
\"target_commitish\": \"master\", \
\"name\": \"Netdisco $TAG\"}" \
$url
done
fi