Skip to content

Commit d46639c

Browse files
authored
feat(cli): add release drafter for 0.1.0 (#173)
Signed-off-by: Joshua Li <joshuali925@gmail.com>
1 parent 75af4dd commit d46639c

File tree

5 files changed

+78
-10
lines changed

5 files changed

+78
-10
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CLI Installer Release Drafter
2+
3+
on:
4+
push:
5+
tags:
6+
- "cli-installer-v*"
7+
8+
jobs:
9+
draft-a-release:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 1440
12+
permissions:
13+
id-token: write
14+
contents: write
15+
issues: write
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
20+
- id: get_approvers
21+
run: |
22+
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT
23+
24+
- uses: trstringer/manual-approval@v1
25+
with:
26+
secret: ${{ github.TOKEN }}
27+
approvers: ${{ steps.get_approvers.outputs.approvers }}
28+
minimum-approvals: 2
29+
issue-title: 'Release cli-installer ${{ github.ref_name }}'
30+
issue-body: "Please approve or deny the release of cli-installer. **Tag**: ${{ github.ref_name }} **Commit**: ${{ github.sha }}"
31+
exclude-workflow-initiator-as-approver: false
32+
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: '24'
36+
registry-url: 'https://registry.npmjs.org'
37+
38+
- name: Install dependencies
39+
working-directory: aws/cli-installer
40+
run: npm ci
41+
42+
- name: Run unit tests
43+
working-directory: aws/cli-installer
44+
run: node --test test/unit.test.mjs
45+
46+
- name: Publish to npm
47+
working-directory: aws/cli-installer
48+
run: npm publish
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
52+
- name: Draft a release
53+
uses: softprops/action-gh-release@v1
54+
with:
55+
draft: false
56+
generate_release_notes: true

.github/workflows/cli-unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: '18'
18+
node-version: '24'
1919
- name: Install dependencies
2020
working-directory: aws/cli-installer
2121
run: npm ci

aws/cli-installer/.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.env
22
.claude
3-
node_modules
43
.kiro
4+
node_modules
5+
*.bak
6+
test

aws/cli-installer/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aws/cli-installer/package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
{
2-
"name": "@opensearch-project/observability-stack-aws-cli",
3-
"version": "0.0.2",
2+
"name": "@opensearch-project/observability-stack",
3+
"version": "0.1.0",
44
"description": "CLI for the Observability Stack",
55
"type": "module",
66
"bin": "./bin/cli-installer.mjs",
77
"scripts": {
8-
"start": "node bin/open-stack.mjs"
8+
"start": "node bin/open-stack.mjs",
9+
"test": "node --test test/unit.test.mjs"
910
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/opensearch-project/observability-stack.git"
14+
},
15+
"license": "Apache-2.0",
16+
"bugs": {
17+
"url": "https://github.com/opensearch-project/observability-stack/issues"
18+
},
19+
"homepage": "https://github.com/opensearch-project/observability-stack/tree/main/aws/cli-installer",
1020
"dependencies": {
1121
"@aws-crypto/sha256-js": "^5.2.0",
1222
"@aws-sdk/client-amp": "^3.750.0",

0 commit comments

Comments
 (0)