From 737c09d7e8fffd8e169c8f25dd454a06c9e97fc6 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 28 Oct 2022 15:31:06 -0700 Subject: [PATCH 1/4] Add release workflows Signed-off-by: Sayali Gaikawad --- .github/workflows/release-drafter.yml | 18 ++++++++++++++++++ jenkins/release.JenkinsFile | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/release-drafter.yml create mode 100644 jenkins/release.JenkinsFile diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 000000000..03cccbf28 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,18 @@ +name: Draft a release + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: true + generate_release_notes: true \ No newline at end of file diff --git a/jenkins/release.JenkinsFile b/jenkins/release.JenkinsFile new file mode 100644 index 000000000..c350b02c3 --- /dev/null +++ b/jenkins/release.JenkinsFile @@ -0,0 +1,11 @@ +lib = library(identifier: 'jenkins@1.0.5', retriever: modernSCM([ + $class: 'GitSCMSource', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', +])) + +standardReleasePipelineWithGenericTrigger( + tokenIdCredential: 'opensearch-js-webhook-token', + causeString: 'A tag was cut on opensearch-project/opensearch-js repository causing this workflow to run', + publishRelease: true){ + publishToNpm(repository: 'https://github.com/opensearch-project/opensearch-js', tag: "$tag") + } \ No newline at end of file From 58e3a549ae8bdd423e1ca99d4c6d78ae84b4e8a9 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Fri, 28 Oct 2022 15:53:16 -0700 Subject: [PATCH 2/4] Add changelog Signed-off-by: Sayali Gaikawad --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e769dc497..2fb52d1a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added - Github workflow for changelog verification ([#306](https://github.com/opensearch-project/opensearch-js/pull/306)) +- Add GitHub and Jenkins release workflow ([#317](https://github.com/opensearch-project/opensearch-js/pull/317)) ### Dependencies - Bumps `tsd` from 0.22.0 to 0.24.1 From f32c0f7f0a5b139d3d43b3a03bbe23d1ecae2157 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Fri, 28 Oct 2022 16:42:28 -0700 Subject: [PATCH 3/4] Update credential id --- jenkins/release.JenkinsFile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/release.JenkinsFile b/jenkins/release.JenkinsFile index c350b02c3..4e8f7c9d5 100644 --- a/jenkins/release.JenkinsFile +++ b/jenkins/release.JenkinsFile @@ -4,8 +4,8 @@ lib = library(identifier: 'jenkins@1.0.5', retriever: modernSCM([ ])) standardReleasePipelineWithGenericTrigger( - tokenIdCredential: 'opensearch-js-webhook-token', + tokenIdCredential: 'jenkins-opensearch-js-generic-webhook-token', causeString: 'A tag was cut on opensearch-project/opensearch-js repository causing this workflow to run', publishRelease: true){ publishToNpm(repository: 'https://github.com/opensearch-project/opensearch-js', tag: "$tag") - } \ No newline at end of file + } From be7d77c905abb1762e1f59c92d9ec7ccf64cf709 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad Date: Mon, 31 Oct 2022 12:34:52 -0700 Subject: [PATCH 4/4] change the jenkins lib version Signed-off-by: Sayali Gaikawad --- jenkins/release.JenkinsFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/release.JenkinsFile b/jenkins/release.JenkinsFile index 4e8f7c9d5..b281001c1 100644 --- a/jenkins/release.JenkinsFile +++ b/jenkins/release.JenkinsFile @@ -1,4 +1,4 @@ -lib = library(identifier: 'jenkins@1.0.5', retriever: modernSCM([ +lib = library(identifier: 'jenkins@1.1.0', retriever: modernSCM([ $class: 'GitSCMSource', remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', ]))