Skip to content

Commit

Permalink
Ads release workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
  • Loading branch information
gaiksaya committed Jan 18, 2024
1 parent 7535a79 commit 8025984
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Draft a release

on:
push:
tags:
- "*"

jobs:
build:
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: 1
issue-title: 'Release opensearch-cluster-cdk : ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-cluster-cdk. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}"
exclude-workflow-initiator-as-approver: false
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
generate_release_notes: true
11 changes: 11 additions & 0 deletions jenkins/release.jenkinsFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
lib = library(identifier: 'jenkins@6.0.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))

standardReleasePipelineWithGenericTrigger(
tokenIdCredential: 'jenkins-opensearch-cluster-cdk-generic-webhook-token',
causeString: 'A tag was cut on opensearch-project/opensearch-cluster-cdk repository causing this workflow to run',
publishRelease: true) {
publishToNpm(publicationType: 'github')
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch-cluster-cdk",
"version": "0.1.0",
"name": "my-opensearch-cluster-cdk-test",
"version": "0.2.0",
"bin": {
"cdk_v2": "bin/app.js"
},
Expand Down

0 comments on commit 8025984

Please sign in to comment.