From b10abdd74b9dbd6c609b5849c8bb9b4a96877ef3 Mon Sep 17 00:00:00 2001 From: Antony O'Neill Date: Tue, 28 May 2019 11:29:20 +0100 Subject: [PATCH] Release to github when making new versions Signed-off-by: Andrew Bruce --- pipeline/pipeline.yml | 16 ++++++++++++++++ pipeline/set-pipeline | 5 +++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pipeline/pipeline.yml b/pipeline/pipeline.yml index 3f9e4652..714c2286 100644 --- a/pipeline/pipeline.yml +++ b/pipeline/pipeline.yml @@ -25,6 +25,13 @@ jobs: password: ((npm-password)) email: engineering@boclips.com path: dist + - &release-put + put: github-release + params: + name: release/name + tag: release/name + body: release/notes + commitish: source/.git/ref - name: publish-minor plan: @@ -36,6 +43,7 @@ jobs: - task: publish file: source/pipeline/publish.yml - *npm-put + - *release-put - name: publish-patch plan: @@ -47,6 +55,7 @@ jobs: - task: publish file: source/pipeline/publish.yml - *npm-put + - *release-put resources: - name: source @@ -79,6 +88,13 @@ resources: days: [Monday, Tuesday, Wednesday, Thursday, Friday] location: Europe/London +- name: github-release + type: github-release + source: + owner: boclips + repository: boclips-player + access_token: ((github-access-token)) + resource_types: - name: npm-resource type: docker-image diff --git a/pipeline/set-pipeline b/pipeline/set-pipeline index a2650a6b..ddcc1c6e 100755 --- a/pipeline/set-pipeline +++ b/pipeline/set-pipeline @@ -2,13 +2,14 @@ set -eu -cwd="$(cd "$(dirname $0)" && pwd)" +cwd="$(cd "$(dirname "$0")" && pwd)" fly --target ci \ set-pipeline \ --pipeline boclips-player \ - --config $cwd/pipeline.yml \ + --config "$cwd/pipeline.yml" \ --var boclips-player-repo-key="$(lpass show concourse-boclips-player-repo-key --notes)" \ --var versions-repo-key="$(lpass show concourse-versions-repo-key --notes)" \ --var npm-username="$(lpass show npmjs --username)" \ --var npm-password="$(lpass show npmjs --password)" \ + --var github-access-token="$(lpass show boclips-player-github-access-token --notes)" \