From 52ba854eb96960d1cf6673679083779f5c7d04e5 Mon Sep 17 00:00:00 2001 From: Steve Pope Date: Tue, 19 Dec 2023 09:29:41 -0330 Subject: [PATCH 1/5] Update package.json version during release --- .github/workflows/release_hotfix.yml | 19 +++++++++++++++++-- .github/workflows/release_version.yml | 16 +++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release_hotfix.yml b/.github/workflows/release_hotfix.yml index 022f140..7464a58 100644 --- a/.github/workflows/release_hotfix.yml +++ b/.github/workflows/release_hotfix.yml @@ -24,7 +24,22 @@ jobs: env: GIT_AUTH_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }} run: | - git config user.name "ami-ci" - git config user.email "<>" + git checkout develop + + # Update the package.json version. Skip the git tag, we'll do that later + npm version ${{ steps.bump-semver.outputs.new_version }} --no-git-tag-version + + # Commit the changed package.json file to develop + git add package.json + git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }}" + git push origin develop + + # Merge develop into master + git checkout master + git merge develop + git push origin master + + # Tag the new version git tag ${{ steps.bump-semver.outputs.new_version }} git push origin ${{ steps.bump-semver.outputs.new_version }} + \ No newline at end of file diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml index 7741d3d..c728a01 100644 --- a/.github/workflows/release_version.yml +++ b/.github/workflows/release_version.yml @@ -34,12 +34,22 @@ jobs: env: GIT_AUTH_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }} run: | - git config user.name "ami-ci" - git config user.email "<>" - git pull origin develop + git checkout develop + + # Update the package.json version. Skip the git tag, we'll do that later + npm version ${{ steps.bump-semver.outputs.new_version }} --no-git-tag-version + + # Commit the changed package.json file to develop + git add package.json + git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }}" + git push origin develop + + # Merge develop into master git checkout master git merge develop git push origin master + + # Tag the new version git tag ${{ steps.bump-semver.outputs.new_version }} git push origin ${{ steps.bump-semver.outputs.new_version }} \ No newline at end of file From a97b05c03df2dd5aa18250863cc5a559ce4d6ec7 Mon Sep 17 00:00:00 2001 From: Steve Pope Date: Tue, 19 Dec 2023 09:38:14 -0330 Subject: [PATCH 2/5] Need the config for git still --- .github/workflows/release_hotfix.yml | 2 ++ .github/workflows/release_version.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/release_hotfix.yml b/.github/workflows/release_hotfix.yml index 7464a58..d325c81 100644 --- a/.github/workflows/release_hotfix.yml +++ b/.github/workflows/release_hotfix.yml @@ -24,6 +24,8 @@ jobs: env: GIT_AUTH_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }} run: | + git config user.name "ami-ci" + git config user.email "<>" git checkout develop # Update the package.json version. Skip the git tag, we'll do that later diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml index c728a01..bfa9bcb 100644 --- a/.github/workflows/release_version.yml +++ b/.github/workflows/release_version.yml @@ -34,6 +34,8 @@ jobs: env: GIT_AUTH_TOKEN: ${{ secrets.SRE_GHACTIONS_TOKEN }} run: | + git config user.name "ami-ci" + git config user.email "<>" git checkout develop # Update the package.json version. Skip the git tag, we'll do that later From 216ec482699684aec2f9a08fb5d7940df75f1bf1 Mon Sep 17 00:00:00 2001 From: Steve Pope Date: Tue, 19 Dec 2023 09:43:41 -0330 Subject: [PATCH 3/5] Hotfix does not touch develop --- .github/workflows/release_hotfix.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/release_hotfix.yml b/.github/workflows/release_hotfix.yml index d325c81..ef8c394 100644 --- a/.github/workflows/release_hotfix.yml +++ b/.github/workflows/release_hotfix.yml @@ -26,19 +26,13 @@ jobs: run: | git config user.name "ami-ci" git config user.email "<>" - git checkout develop # Update the package.json version. Skip the git tag, we'll do that later npm version ${{ steps.bump-semver.outputs.new_version }} --no-git-tag-version - # Commit the changed package.json file to develop + # Commit the changed package.json file to master git add package.json git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }}" - git push origin develop - - # Merge develop into master - git checkout master - git merge develop git push origin master # Tag the new version From 8d34537014d135632b34cea8e161e9b367de3d31 Mon Sep 17 00:00:00 2001 From: Steve Pope Date: Tue, 19 Dec 2023 11:33:56 -0330 Subject: [PATCH 4/5] Add skip-ci to commit message to prevent kicking off another build --- .github/workflows/release_hotfix.yml | 2 +- .github/workflows/release_version.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_hotfix.yml b/.github/workflows/release_hotfix.yml index ef8c394..69e7221 100644 --- a/.github/workflows/release_hotfix.yml +++ b/.github/workflows/release_hotfix.yml @@ -32,7 +32,7 @@ jobs: # Commit the changed package.json file to master git add package.json - git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }}" + git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }} [skip ci]" git push origin master # Tag the new version diff --git a/.github/workflows/release_version.yml b/.github/workflows/release_version.yml index bfa9bcb..c56a90e 100644 --- a/.github/workflows/release_version.yml +++ b/.github/workflows/release_version.yml @@ -43,7 +43,7 @@ jobs: # Commit the changed package.json file to develop git add package.json - git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }}" + git commit -m "Bump version to ${{ steps.bump-semver.outputs.new_version }} [skip ci]" git push origin develop # Merge develop into master From e8f1ff453a15b4940cbb4d257e3ee1d51e559a0a Mon Sep 17 00:00:00 2001 From: ami-ci <> Date: Tue, 19 Dec 2023 18:39:11 +0000 Subject: [PATCH 5/5] Bump version to 3.6.5 [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7de311b..378bf05 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "customerio-gist-web", - "version": "3.6.4", + "version": "3.6.5", "description": "Build beautiful in-app flows with no code and deliver them instantly to your app. http://customer.io", "private": false, "scripts": {