From 90307e7583d58686fbbe7b4c9b8c0b43657b3962 Mon Sep 17 00:00:00 2001 From: Sarbagya Dhaubanjar Date: Tue, 22 Apr 2025 15:56:31 +0545 Subject: [PATCH 01/12] Add GitHub Actions workflow for CI deployment and versioning --- .github/workflows/check.yml | 0 .github/workflows/dev.yml | 74 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) delete mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/dev.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index e69de29..0000000 diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..13c0c4f --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,74 @@ +name: Dev + +on: + push: + branches: + - develop + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CI_COMMIT_MESSAGE: Deployment by CI + CI_COMMIT_AUTHOR: ci@acmesoftware.com + +jobs: + dev: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Perform semantic version + uses: paulhatch/semantic-version@v5.4.0 + id: versioning + with: + tag_prefix: "v" + major_pattern: "(MAJOR)" + minor_pattern: "(MINOR)" + version_format: "${major}.${minor}.${patch}-rc${increment}" + user_format_type: "csv" + bump_each_commit: false + search_commit_body: true + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 + with: + custom_tag: ${{ steps.versioning.outputs.version_tag }} + tag_prefix: "" + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Changelog + id: changelog + uses: mikepenz/release-changelog-builder-action@v5 + with: + fromTag: v${{ steps.versioning.outputs.previous_version }} + toTag: ${{ steps.tag_version.outputs.new_tag }} + + - name: Create production release + uses: ncipollo/release-action@v1 + id: release + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: ${{ steps.versioning.outputs.version_tag }} + body: ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false + commit: ${{ steps.versioning.outputs.current_commit }} + + - name: Update CHANGELOG & update develop branch + run: | + git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" + git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}" + changelog='${{ steps.changelog.outputs.changelog }}' + escaped_changelog=$(printf '%s\n' "$changelog" | sed 's/\\/&&/g;s/^[[:blank:]]/\\&/;s/$/\\/') + sed -i "2i ${escaped_changelog%?}" CHANGELOG.md + sed -i "2i ## ${{ steps.versioning.outputs.version_tag }} - $(date +'%d-%m-%Y')" CHANGELOG.md + git add -A && git commit -m "chore(docs): update CHANGELOG.MD" + git push origin main + git push --force origin main:develop From b6a703c073cc7b24827f31e8978d3eba91db2179 Mon Sep 17 00:00:00 2001 From: Sarbagya Dhaubanjar Date: Tue, 22 Apr 2025 15:57:36 +0545 Subject: [PATCH 02/12] Add README.md with project title for Version Playground --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7feca2e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Version Playground \ No newline at end of file From 8bb88640cda3865bafb1b86aaeaa0fb8d03b406d Mon Sep 17 00:00:00 2001 From: Sarbagya Dhaubanjar Date: Tue, 22 Apr 2025 15:59:33 +0545 Subject: [PATCH 03/12] Initialize CHANGELOG.md file --- CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 From b6f65c77b06cf1afae61504b8f519f559638453d Mon Sep 17 00:00:00 2001 From: Sarbagya Dhaubanjar Date: Tue, 22 Apr 2025 16:03:47 +0545 Subject: [PATCH 04/12] Add initial content to CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..39a5c90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# CHANGELOG.md \ No newline at end of file From 580704e74d9a66d1bdeceead3ea4f5c7eba6a28f Mon Sep 17 00:00:00 2001 From: Sarbagya Dhaubanjar Date: Tue, 22 Apr 2025 21:20:16 +0545 Subject: [PATCH 05/12] Update landing page description in index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index f72af95..c5d265a 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,7 @@

Welcome to Version Playground

-

This is a simple HTML page for the Version Playground project.

+

This is a landing page for the Version Playground project.