Skip to content

Commit 36c4f5f

Browse files
authored
chore: install changeset (#28)
1 parent 4e50f49 commit 36c4f5f

File tree

8 files changed

+803
-3
lines changed

8 files changed

+803
-3
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ on:
33
push:
44
branches:
55
- main
6-
paths:
7-
- 'charts/*/Chart.yaml'
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
89
permissions:
910
contents: write
11+
pull-requests: write
1012
jobs:
1113
release:
1214
runs-on: ubuntu-latest
@@ -19,7 +21,18 @@ jobs:
1921
run: |
2022
git config user.name "$GITHUB_ACTOR"
2123
git config user.email "[email protected]"
24+
- name: Setup Node.js 20
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: 20
28+
- name: Install Dependencies
29+
run: yarn
30+
- name: Create Release Pull Request
31+
uses: changesets/action@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2234
- name: Run chart-releaser job
35+
if: steps.changesets.outputs.hasChangesets == 'false'
2336
uses: helm/[email protected]
2437
env:
2538
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.act/act.yaml
2+
node_modules

charts/hdx-oss-v2/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: hdx-oss-v2
33
description: A Helm chart for HyperDX OSS V2
44
type: application
55
version: 0.5.1
6-
appVersion: "1.0.0"
6+
appVersion: 1.0.0

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "helm-charts",
3+
"version": "0.5.1",
4+
"main": "index.js",
5+
"repository": "[email protected]:hyperdxio/helm-charts.git",
6+
"author": "HyperDX",
7+
"license": "MIT",
8+
"scripts": {
9+
"release": "changeset publish",
10+
"version": "changeset version && npm run update-chart-versions",
11+
"update-chart-versions": "node scripts/update-chart-versions.js"
12+
},
13+
"dependencies": {
14+
"@changesets/cli": "^2.29.4",
15+
"js-yaml": "^4.1.0"
16+
}
17+
}

scripts/update-chart-versions.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fs = require("fs");
2+
const yaml = require("js-yaml");
3+
const { version } = require("../package.json");
4+
5+
// Update Chart.yaml files with the new version
6+
const charts = ["./charts/hdx-oss-v2"];
7+
8+
charts.forEach((chartPath) => {
9+
const chartFile = `${chartPath}/Chart.yaml`;
10+
const chart = yaml.load(fs.readFileSync(chartFile, "utf8"));
11+
chart.version = version;
12+
fs.writeFileSync(chartFile, yaml.dump(chart));
13+
});

0 commit comments

Comments
 (0)