Skip to content

Commit

Permalink
Add release workflows (opensearch-project#317)
Browse files Browse the repository at this point in the history
* Add release workflows

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Add changelog

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

* Update credential id

* change the jenkins lib version

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>

Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
gaiksaya authored and AMoo-Miki committed Jul 12, 2023
1 parent 7d246cb commit d65c45c
Showing 3 changed files with 5 additions and 16 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -10,21 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- id: get_data
run: |
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
echo "version=$(cat package.json | jq .version | tr -d "\"")" >> $GITHUB_OUTPUT
- uses: trstringer/manual-approval@v1
with:
secret: ${{ github.TOKEN }}
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 2
issue-title: 'Release opensearch-js : ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-js. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}"
exclude-workflow-initiator-as-approver: true
uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
generate_release_notes: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

4 changes: 2 additions & 2 deletions jenkins/release.JenkinsFile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
lib = library(identifier: 'jenkins@1.1.1', retriever: modernSCM([
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) {
publishRelease: true){
publishToNpm(repository: 'https://github.com/opensearch-project/opensearch-js', tag: "$tag")
}

0 comments on commit d65c45c

Please sign in to comment.