diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d8dd658bfb6..d461e640dc2 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -26,8 +26,22 @@ jobs: 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: true - - name: Release + - name: Set up node + uses: actions/setup-node@v3 + with: + node-version: 16.16.0 + registry-url: 'https://registry.npmjs.org' + - name: Build and package + run: | + npm install && npm run build + npm pack + filename=`ls | grep opensearch-project-opensearch-cluster-cdk` + mkdir publish-cluster-cdk && mv $filename publish-cluster-cdk/opensearch-cluster-cdk.tar.gz + tar -cvf artifacts.tar.gz publish-cluster-cdk + - name: Draft a release uses: softprops/action-gh-release@v1 with: draft: true - generate_release_notes: true \ No newline at end of file + generate_release_notes: true + files: | + artifacts.tar.gz diff --git a/jenkins/release.jenkinsFile b/jenkins/release.jenkinsFile index ed743d5b8f9..a8f285fb3b1 100644 --- a/jenkins/release.jenkinsFile +++ b/jenkins/release.jenkinsFile @@ -6,6 +6,10 @@ lib = library(identifier: 'jenkins@6.0.0', retriever: modernSCM([ 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', + downloadReleaseAsset: true, publishRelease: true) { - publishToNpm(publicationType: 'github') + publishToNpm( + publicationType: 'artifact', + artifactPath: "${WORKSPACE}/publish-cluster-cdk/opensearch-cluster-cdk.tar.gz" + ) } diff --git a/package-lock.json b/package-lock.json index 0f16e288006..dd0faab2b3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@opensearch-project/opensearch-cluster-cdk", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@opensearch-project/opensearch-cluster-cdk", - "version": "1.0.0", + "version": "1.0.1", "dependencies": { "@typescript-eslint/eslint-plugin": "^4.31.1", "@typescript-eslint/parser": "^4.31.1", diff --git a/package.json b/package.json index b290816ef25..a12d695a170 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@opensearch-project/opensearch-cluster-cdk", - "version": "1.0.0", + "version": "1.0.1", "bin": { "cdk_v2": "bin/app.js" },