From cec32107e7d90adcc268e03d8496da00c9031a6d Mon Sep 17 00:00:00 2001 From: Anurag Mittal <1321012+anurag4DSB@users.noreply.github.com> Date: Wed, 14 Oct 2026 15:43:25 +0200 Subject: [PATCH 1/2] CLDSRVCLT-21: Allow prereleases from epic branches The release workflow ran only from development/* and hotfix/* branches, and it always published under the npm dist-tag latest. An epic branch needs its own tags without moving latest. An epic/* branch can now release, but only a prerelease version (one with a "-" part, such as 1.0.14-bnaas.1). Every prerelease version goes to npm and GitHub Packages under the dist-tag prerelease, and its GitHub release is marked as a prerelease. A GA version from development/* or hotfix/* releases as before, under latest. --- .github/workflows/release.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f90868f..fa2ff8cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,16 +17,19 @@ jobs: attestations: write outputs: version: ${{ steps.package-version.outputs.version }} + npm-tag: ${{ steps.release-kind.outputs.npm-tag }} + prerelease: ${{ steps.release-kind.outputs.prerelease }} steps: - name: Reject disallowed branch if: >- ${{ !startsWith(github.ref, 'refs/heads/development/') - && !startsWith(github.ref, 'refs/heads/hotfix/') }} + && !startsWith(github.ref, 'refs/heads/hotfix/') + && !startsWith(github.ref, 'refs/heads/epic/') }} env: REF_NAME: ${{ github.ref_name }} run: | - echo "::error::Releases must run from a development/* or" \ - "hotfix/* branch (got $REF_NAME)" + echo "::error::Releases must run from a development/*," \ + "hotfix/* or epic/* branch (got $REF_NAME)" exit 1 - name: Checkout code @@ -39,6 +42,24 @@ jobs: id: package-version run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT + - name: Pick npm dist-tag + id: release-kind + env: + REF_NAME: ${{ github.ref_name }} + VERSION: ${{ steps.package-version.outputs.version }} + run: | + case "${VERSION%%+*}" in + *-*) prerelease=true; npm_tag=prerelease ;; + *) prerelease=false; npm_tag=latest ;; + esac + if [[ "$REF_NAME" == epic/* && "$prerelease" != true ]]; then + echo "::error::An epic/* branch releases prerelease" \ + "versions only (got $VERSION)" + exit 1 + fi + echo "npm-tag=$npm_tag" >> "$GITHUB_OUTPUT" + echo "prerelease=$prerelease" >> "$GITHUB_OUTPUT" + - name: Fail if release already exists env: GH_TOKEN: ${{ github.token }} @@ -105,11 +126,12 @@ jobs: - name: Publish to npm with provenance env: VERSION: ${{ needs.build.outputs.version }} + NPM_TAG: ${{ needs.build.outputs.npm-tag }} run: | if [ -n "$(npm view "@scality/cloudserverclient@$VERSION" version 2>/dev/null)" ]; then echo "::notice::@scality/cloudserverclient@$VERSION already on npm; skipping" else - npm publish *.tgz --provenance --tag latest + npm publish *.tgz --provenance --tag "$NPM_TAG" fi publish-github: @@ -135,11 +157,12 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ needs.build.outputs.version }} + NPM_TAG: ${{ needs.build.outputs.npm-tag }} run: | if [ -n "$(npm view "@scality/cloudserverclient@$VERSION" version 2>/dev/null)" ]; then echo "::notice::@scality/cloudserverclient@$VERSION already on GitHub Packages; skipping" else - npm publish *.tgz --tag latest + npm publish *.tgz --tag "$NPM_TAG" fi create-release: @@ -157,6 +180,7 @@ jobs: tag_name: ${{ needs.build.outputs.version }} name: Release ${{ needs.build.outputs.version }} target_commitish: ${{ github.sha }} + prerelease: ${{ needs.build.outputs.prerelease == 'true' }} generate_release_notes: true append_body: true body: | From ce704b78bccdd46207b448fbc6a22bc276af095c Mon Sep 17 00:00:00 2001 From: Anurag Mittal <1321012+anurag4DSB@users.noreply.github.com> Date: Wed, 14 Oct 2026 15:43:25 +0200 Subject: [PATCH 2/2] CLDSRVCLT-21: Bump version to 1.0.14-bnaas.1 Set the version on the BNaaS D1 epic to its first epic tag. The release workflow then publishes 1.0.14-bnaas.1 from the epic branch under the dist-tag prerelease, and latest stays on 1.0.13. Epic branch: epic/S3C-10971-bnaas-d1 Cut from: development/1.0 at fb6dd257 on 2026-10-14 Last release on that line: 1.0.13 Changes since that release: https://github.com/scality/cloudserverclient/compare/1.0.13...fb6dd257 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19d8a425..d0667dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@scality/cloudserverclient", - "version": "1.0.13", + "version": "1.0.14-bnaas.1", "engines": { "node": ">=20" },