From 346e64412c4dab8b329a1bcfc369eacce0aae8a2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 4 Jun 2025 11:18:50 +0000 Subject: [PATCH 1/7] chore(m-render): set version 2.7.2 --- libs/m-render/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/m-render/package.json b/libs/m-render/package.json index afda55a..edf48bc 100644 --- a/libs/m-render/package.json +++ b/libs/m-render/package.json @@ -1,6 +1,6 @@ { "name": "@foblex/m-render", - "version": "2.7.0", + "version": "2.7.2", "description": "MRender is a static site generator designed for creating fast and user-friendly documentation sites based on Markdown files. MarkEngine supports extended Markdown syntax and can render Angular components directly from Markdown files.", "author": "Siarhei Huzarevich", "license": "MIT", From b2438973896319da5b43b9bec01036208d641d29 Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:19:39 +0200 Subject: [PATCH 2/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 4dc12ee..0e747ff 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -1,7 +1,7 @@ name: Publish on Release Branch on: - create: + push: branches: - release/** @@ -18,7 +18,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' registry-url: 'https://registry.npmjs.org/' - name: Install dependencies From 3125850b8998032dd6e2002fbe617de133966ff6 Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:24:16 +0200 Subject: [PATCH 3/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 0e747ff..b1d90db 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -30,13 +30,25 @@ jobs: BRANCH="${GITHUB_REF##refs/heads/release/}" echo "VERSION=$BRANCH" >> $GITHUB_OUTPUT - - name: Set version in internal package.json + - name: Set version in internal package.json if needed + id: maybe-update-version run: | VERSION="${{ steps.version.outputs.VERSION }}" - jq --arg v "$VERSION" '.version = $v' libs/m-render/package.json > tmp.$$.json - mv tmp.$$.json libs/m-render/package.json - + CURRENT=$(jq -r .version libs/m-render/package.json) + + echo "Current: $CURRENT, Target: $VERSION" + if [ "$VERSION" = "$CURRENT" ]; then + echo "Version already set to $VERSION, skipping update." + echo "UPDATED=false" >> $GITHUB_OUTPUT + else + echo "Updating version to $VERSION" + jq --arg v "$VERSION" '.version = $v' libs/m-render/package.json > tmp.$$.json + mv tmp.$$.json libs/m-render/package.json + echo "UPDATED=true" >> $GITHUB_OUTPUT + fi + - name: Commit and push version bump + if: steps.maybe-update-version.outputs.UPDATED == 'true' run: | git config user.name "github-actions" git config user.email "github-actions@github.com" From b122f58c2f90da68621057d57881fde8a532d043 Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:27:31 +0200 Subject: [PATCH 4/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index b1d90db..0fd6f9b 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -1,4 +1,4 @@ -name: Publish on Release Branch +name: Publish m-render on Release on: push: @@ -18,7 +18,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '18' registry-url: 'https://registry.npmjs.org/' - name: Install dependencies @@ -27,16 +27,17 @@ jobs: - name: Extract version from branch name id: version run: | - BRANCH="${GITHUB_REF##refs/heads/release/}" - echo "VERSION=$BRANCH" >> $GITHUB_OUTPUT + VERSION="${GITHUB_REF##refs/heads/release/}" + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT - - name: Set version in internal package.json if needed + - name: Set version in package.json if needed id: maybe-update-version run: | VERSION="${{ steps.version.outputs.VERSION }}" CURRENT=$(jq -r .version libs/m-render/package.json) - - echo "Current: $CURRENT, Target: $VERSION" + echo "Current version: $CURRENT" + echo "Target version: $VERSION" + if [ "$VERSION" = "$CURRENT" ]; then echo "Version already set to $VERSION, skipping update." echo "UPDATED=false" >> $GITHUB_OUTPUT @@ -46,8 +47,8 @@ jobs: mv tmp.$$.json libs/m-render/package.json echo "UPDATED=true" >> $GITHUB_OUTPUT fi - - - name: Commit and push version bump + + - name: Commit and push version update if: steps.maybe-update-version.outputs.UPDATED == 'true' run: | git config user.name "github-actions" @@ -59,7 +60,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build library - run: npx nx run m-render:build:production + run: npx nx run m-render:build:production --skip-nx-cache - name: Publish library run: npx nx run m-render:nx-release-publish From 22d019f4d1c3df2eca88719bbd855898de375610 Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:27:52 +0200 Subject: [PATCH 5/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 0fd6f9b..da25887 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -18,7 +18,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' registry-url: 'https://registry.npmjs.org/' - name: Install dependencies From a5c04315feed439d49057092127efa9c0649ceef Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:31:25 +0200 Subject: [PATCH 6/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index da25887..578d471 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -63,6 +63,14 @@ jobs: run: npx nx run m-render:build:production --skip-nx-cache - name: Publish library - run: npx nx run m-render:nx-release-publish + run: npx nx run m-render:nx-release-publish --skip-nx-cache env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Create and push git tag + run: | + VERSION="${{ steps.version.outputs.VERSION }}" + git tag v$VERSION + git push origin v$VERSION + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f053442db1f7b5993d66765e8093b8a212e85b16 Mon Sep 17 00:00:00 2001 From: Siarhei Huzarevich Date: Wed, 4 Jun 2025 13:35:47 +0200 Subject: [PATCH 7/7] Update publish-on-release.yml --- .github/workflows/publish-on-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index 578d471..bb03f0f 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -62,6 +62,11 @@ jobs: - name: Build library run: npx nx run m-render:build:production --skip-nx-cache + - name: Set up .npmrc for publishing + run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish library run: npx nx run m-render:nx-release-publish --skip-nx-cache env: