From e601da9612e48a932139ee6bda394f534d1e6c13 Mon Sep 17 00:00:00 2001 From: Anirban Kar Date: Mon, 16 Dec 2024 22:04:33 +0530 Subject: [PATCH] updated workflow for commit and stable release --- .github/workflows/commit.yaml | 12 +++++------- .github/workflows/update-stable.yml | 5 ++++- app/commit.json | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index 150948ae2..4e8545b0a 100644 --- a/.github/workflows/commit.yaml +++ b/.github/workflows/commit.yaml @@ -17,19 +17,17 @@ jobs: - name: Checkout the code uses: actions/checkout@v3 - - name: Get the latest commit hash - run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' - - - - name: Update commit file + - name: Get the latest commit hash run: | + echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV + + - name: Update commit file + run: | echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json - name: Commit and push the update diff --git a/.github/workflows/update-stable.yml b/.github/workflows/update-stable.yml index e6fc2e58b..d930fbd1d 100644 --- a/.github/workflows/update-stable.yml +++ b/.github/workflows/update-stable.yml @@ -158,10 +158,13 @@ jobs: echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - - name: Commit and Tag Release + - name: Get the latest commit hash and version tag run: | echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV + + - name: Commit and Tag Release + run: | git pull echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json git add package.json pnpm-lock.yaml changelog.md app/commit.json diff --git a/app/commit.json b/app/commit.json index d46475e3f..27b04a24f 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "de2cb43d170033c43a6cf436af02e033f66a7e4d" , "version": "" } +{ "commit": "47a1def87778d223b21b8468fcfd974b9498be5a" }