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/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 diff --git a/jenkins/release.JenkinsFile b/jenkins/release.JenkinsFile new file mode 100644 index 000000000..b281001c1 --- /dev/null +++ b/jenkins/release.JenkinsFile @@ -0,0 +1,11 @@ +lib = library(identifier: 'jenkins@1.1.0', retriever: modernSCM([ + $class: 'GitSCMSource', + remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', +])) + +standardReleasePipelineWithGenericTrigger( + 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") + }