From 28a6d2251215a06a745dd1b4f81d5196d03e1658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bendeg=C3=BAz=20Csirmaz?= Date: Wed, 15 Apr 2026 15:51:31 +0200 Subject: [PATCH] feat(dir-sdk-javascript): pin version to 1.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bendegúz Csirmaz --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/workflows/ci.yaml | 23 +++++++------- .github/workflows/reusable-release-sdk.yaml | 1 + .github/workflows/reusable-test-sdk.yaml | 12 ++++---- CHANGELOG.md | 2 +- RELEASE.md | 33 +++++++++++++++++++++ Taskfile.deps.yml | 4 +-- Taskfile.test-env.yml | 4 +-- Taskfile.vars.yml | 4 +-- Taskfile.yml | 2 +- package-lock.json | 18 ++++------- package.json | 5 ++-- 12 files changed, 68 insertions(+), 42 deletions(-) create mode 100644 RELEASE.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 4d32c11..940d29f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -30,7 +30,7 @@ body: If applicable, provide the version number or release tag where this issue was encountered options: - - v1.1.0 + - v1.2.1 default: 0 validations: required: false diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a6c64eb..f73128c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,18 +37,14 @@ jobs: with: filters: | code: - - '!docs/**' - - '!README.md' - '!CHANGELOG.md' - - '!CONTRIBUTING.md' - '!CODE_OF_CONDUCT.md' - - '!SECURITY.md' - - '!LICENSE.md' + - '!CONTRIBUTING.md' + - '!LICENSE' - '!MAINTAINERS.md' - - '!CONTRIBUTORS.md' - - '!AUTHZ.md' - - '!API_SPEC.md' + - '!README.md' - '!RELEASE.md' + - '!SECURITY.md' - '!.gitignore' - name: Determine result @@ -67,8 +63,15 @@ jobs: - changes uses: ./.github/workflows/reusable-test-sdk.yaml with: - image_repo: ghcr.io/agntcy - image_tag: ${{ github.sha }} + dir_chart_version: v1.2.0 + dirctl_image_tag: v1.2.0 + + release: + name: Release + if: ${{ startsWith(github.ref, 'refs/tags/') }} + needs: + - test + uses: ./.github/workflows/reusable-release-sdk.yaml success: name: Success diff --git a/.github/workflows/reusable-release-sdk.yaml b/.github/workflows/reusable-release-sdk.yaml index 48463e7..7f3ef0a 100644 --- a/.github/workflows/reusable-release-sdk.yaml +++ b/.github/workflows/reusable-release-sdk.yaml @@ -4,6 +4,7 @@ name: Release SDK on: + workflow_call: workflow_dispatch: permissions: diff --git a/.github/workflows/reusable-test-sdk.yaml b/.github/workflows/reusable-test-sdk.yaml index f745fda..5031d23 100644 --- a/.github/workflows/reusable-test-sdk.yaml +++ b/.github/workflows/reusable-test-sdk.yaml @@ -6,14 +6,14 @@ name: Test SDK on: workflow_call: inputs: - image_repo: + dir_chart_version: required: true type: string - description: "Image repo to use." - image_tag: + description: "The version of the dir Helm chart to install for the tests." + dirctl_image_tag: required: true type: string - description: "Image tag to use." + description: "The tag of the dir-ctl Docker image to use in the tests." permissions: id-token: write @@ -68,7 +68,7 @@ jobs: - name: Test JavaScript SDK env: - CHART_VERSION: "0.0.0-latest" - IMAGE_TAG: latest + DIR_CHART_VERSION: ${{ inputs.dir_chart_version }} + DIRCTL_IMAGE_TAG: ${{ inputs.dirctl_image_tag }} run: | task sdk:test:javascript diff --git a/CHANGELOG.md b/CHANGELOG.md index f208450..1ef2d1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ [agntcy/dir]: https://github.com/agntcy/dir [agntcy/dir-sdk-javascript]: https://github.com/agntcy/dir-sdk-javascript -## 1.1.0 (2026-04-10) +## 1.2.1 (2026-04-15) ### Added diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..ab02eb1 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,33 @@ +# Release + +This document outlines the process of creating a new release +for the Directory JavaScript SDK. + +## 1. Create a release branch + +Create a branch for the new release: + +1. Update the SDK version in: + - `package.json` + - `.github/ISSUE_TEMPLATE/bug_report.yml` +2. Update the dependencies if necessary: + - [@buf/agntcy_dir.bufbuild_es](https://buf.build/agntcy/dir/sdks/v1.2.0%3Abufbuild/es?version=v2.9.0) (Buf SDK) + - `.github/workflows/ci.yaml` (dir & dir-ctl version) +3. Add an entry to `CHANGELOG.md` + +## 2. Create and push tags + +After the release branch is merged, update your main branch: + +```sh +git checkout main +git pull origin main +``` + +To trigger the release workflow, create and push the release tag +for the last commit: + +```sh +git tag -a v1.2.1 +git push origin v1.2.1 +``` diff --git a/Taskfile.deps.yml b/Taskfile.deps.yml index 9c55c5c..26e410c 100644 --- a/Taskfile.deps.yml +++ b/Taskfile.deps.yml @@ -73,8 +73,8 @@ tasks: internal: true run: once vars: - IMAGE_TAG: "{{ .IMAGE_TAG }}" + DIRCTL_IMAGE_TAG: "{{ .DIRCTL_IMAGE_TAG }}" preconditions: - which docker cmds: - - docker image pull ghcr.io/agntcy/dir-ctl:{{.IMAGE_TAG}} + - docker image pull ghcr.io/agntcy/dir-ctl:{{ .DIRCTL_IMAGE_TAG }} diff --git a/Taskfile.test-env.yml b/Taskfile.test-env.yml index 99d8922..b82dd48 100644 --- a/Taskfile.test-env.yml +++ b/Taskfile.test-env.yml @@ -79,8 +79,7 @@ tasks: source /tmp/dir-htpasswd-creds.env {{ .HELM_BIN }} install dir oci://ghcr.io/agntcy/dir/helm-charts/dir \ - --version="{{ .CHART_VERSION }}" \ - --set apiserver.image.tag="{{ .IMAGE_TAG }}" \ + --version="{{ .DIR_CHART_VERSION }}" \ --set apiserver.image.pullSecrets="" \ --set apiserver.service.type="NodePort" \ --set apiserver.service.nodePort="{{.API_NODEPORT}}" \ @@ -100,7 +99,6 @@ tasks: {{ if .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_RPS }}--set apiserver.config.ratelimit.per_client_rps="{{ .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_RPS }}"{{ end }} \ {{ if .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_BURST }}--set apiserver.config.ratelimit.per_client_burst="{{ .DIRECTORY_SERVER_RATELIMIT_PER_CLIENT_BURST }}"{{ end }} \ {{ if .DIRECTORY_SERVER_OASF_API_VALIDATION_SCHEMA_URL }}--set apiserver.config.oasf_api_validation.schema_url="{{ .DIRECTORY_SERVER_OASF_API_VALIDATION_SCHEMA_URL }}"{{ end }} \ - --set apiserver.reconciler.image.tag="{{ .IMAGE_TAG }}" \ --set apiserver.reconciler.config.regsync.interval="10s" \ --set apiserver.reconciler.config.indexer.interval="10s" \ --set apiserver.reconciler.config.name.interval="5s" \ diff --git a/Taskfile.vars.yml b/Taskfile.vars.yml index b94bebb..dcb5794 100644 --- a/Taskfile.vars.yml +++ b/Taskfile.vars.yml @@ -4,8 +4,8 @@ version: "3" vars: - CHART_VERSION: '{{ .CHART_VERSION | default "0.0.0-latest" }}' - IMAGE_TAG: '{{ .IMAGE_TAG | default "latest" }}' + DIR_CHART_VERSION: '{{ .DIR_CHART_VERSION | default "0.0.0-latest" }}' + DIRCTL_IMAGE_TAG: '{{ .DIRCTL_IMAGE_TAG | default "latest" }}' BIN_DIR: "{{ .ROOT_DIR }}/.bin" HELM_VERSION: "4.1.3" HELM_BIN: "{{ .BIN_DIR }}/helm-{{.HELM_VERSION}}" diff --git a/Taskfile.yml b/Taskfile.yml index 3296184..be3c2ed 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -81,8 +81,8 @@ tasks: - task: sdk:test-env:create - defer: { task: sdk:test-env:delete } - | + export DIRCTL_IMAGE_TAG="{{ .DIRCTL_IMAGE_TAG }}" export COSIGN_PATH="$(printf "%s" "${COSIGN_PATH:-{{ .COSIGN_BIN }}}")" - export DIRCTL_IMAGE_TAG="{{ .IMAGE_TAG }}" # Run SDK tests npm run test diff --git a/package-lock.json b/package-lock.json index 145bfc4..fb44f1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,15 @@ { "name": "agntcy-dir", - "version": "1.1.0", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "agntcy-dir", - "version": "1.1.0", + "version": "1.2.1", "license": "Apache-2.0", "dependencies": { - "@buf/agntcy_dir.bufbuild_es": "^2.9.0-20260319131759-f3a65f0dc151.1", - "@buf/bufbuild_protovalidate.bufbuild_es": "^2.11.0-20260209202127-80ab13bee0bf.1", + "@buf/agntcy_dir.bufbuild_es": "2.9.0-20260413212701-cb1fb6353ac1.1", "@bufbuild/protobuf": "^2.9.0", "@connectrpc/connect": "^2.1.0", "@connectrpc/connect-node": "^2.1.0", @@ -39,8 +38,8 @@ } }, "node_modules/@buf/agntcy_dir.bufbuild_es": { - "version": "2.9.0-20260319131759-f3a65f0dc151.1", - "resolved": "https://buf.build/gen/npm/v1/@buf/agntcy_dir.bufbuild_es/-/agntcy_dir.bufbuild_es-2.9.0-20260319131759-f3a65f0dc151.1.tgz", + "version": "2.9.0-20260413212701-cb1fb6353ac1.1", + "resolved": "https://buf.build/gen/npm/v1/@buf/agntcy_dir.bufbuild_es/-/agntcy_dir.bufbuild_es-2.9.0-20260413212701-cb1fb6353ac1.1.tgz", "dependencies": { "@buf/bufbuild_protovalidate.bufbuild_es": "2.9.0-20260209202127-80ab13bee0bf.1" }, @@ -55,13 +54,6 @@ "@bufbuild/protobuf": "^2.9.0" } }, - "node_modules/@buf/bufbuild_protovalidate.bufbuild_es": { - "version": "2.11.0-20260209202127-80ab13bee0bf.1", - "resolved": "https://buf.build/gen/npm/v1/@buf/bufbuild_protovalidate.bufbuild_es/-/bufbuild_protovalidate.bufbuild_es-2.11.0-20260209202127-80ab13bee0bf.1.tgz", - "peerDependencies": { - "@bufbuild/protobuf": "^2.11.0" - } - }, "node_modules/@bufbuild/protobuf": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz", diff --git a/package.json b/package.json index 63811f2..69872ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agntcy-dir", - "version": "1.1.0", + "version": "1.2.1", "description": "Directory SDK", "homepage": "https://github.com/agntcy/dir", "bugs": { @@ -41,8 +41,7 @@ }, "packageManager": "npm@11.12.1", "dependencies": { - "@buf/agntcy_dir.bufbuild_es": "^2.9.0-20260319131759-f3a65f0dc151.1", - "@buf/bufbuild_protovalidate.bufbuild_es": "^2.11.0-20260209202127-80ab13bee0bf.1", + "@buf/agntcy_dir.bufbuild_es": "2.9.0-20260413212701-cb1fb6353ac1.1", "@bufbuild/protobuf": "^2.9.0", "@connectrpc/connect": "^2.1.0", "@connectrpc/connect-node": "^2.1.0",