Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 547fd44

Browse files
committed
ci update 4
1 parent 4c14233 commit 547fd44

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.circleci/config.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ jobs:
6969
- run:
7070
name: Move results to ci folder
7171
command: |
72-
mkdir -pv ci/job/build
72+
mkdir -pv ci/job/build_plugin
7373
mkdir -pv ci/packages
7474
mkdir -pv ci/jobs/package
7575
mkdir -pv ci/grafana-test-env
76-
cp -rv dist ci/job/build
76+
cp -rv dist ci/job/build_plugin
7777
- run:
7878
name: Package distribution
7979
command: |
@@ -121,4 +121,33 @@ jobs:
121121
- run:
122122
name: "Publish Release on GitHub"
123123
command: |
124-
/usr/local/bin/grafana-toolkit plugin:github-publish
124+
DATASOURCE_NAME=grafana-worldmap-panel
125+
# copy ci dist
126+
cp -r ci/jobs/build_plugin/dist .
127+
# copy ci artifacts
128+
mkdir -p artifacts
129+
# skip for this type of build
130+
# cp -r ci/packages/* artifacts
131+
cp -r release/* artifacts
132+
apk add --update --no-cache jq git-lfs
133+
RELEASE_NOTES=`awk 'BEGIN {FS="##"; RS=""} FNR==4 {print; exit}' CHANGELOG.md`
134+
VERSION=`cat dist/plugin.json|jq '.info.version'| sed s/\"//g`
135+
git config user.email "[email protected]"
136+
git config user.name "CircleCI Automation"
137+
git checkout -b release-${VERSION}
138+
git add --force dist/
139+
git add artifacts/
140+
git commit -m "automated release $VERSION [skip ci]"
141+
git push -f origin release-${VERSION}
142+
git tag -f v${VERSION}
143+
git push -f origin v${VERSION}
144+
ghr \
145+
-t ${GITHUB_TOKEN} \
146+
-u ${CIRCLE_PROJECT_USERNAME} \
147+
-r ${CIRCLE_PROJECT_REPONAME} \
148+
-c ${CIRCLE_SHA1} \
149+
-n "${DATASOURCE_NAME} v${VERSION}" \
150+
-b "${RELEASE_NOTES}" \
151+
-delete \
152+
v${VERSION} \
153+
./artifacts/

0 commit comments

Comments
 (0)