dear-digital / shopify-theme-skeleton

Open-source Shopify theme for content creators and digital entrepreneurs. Adaptable architecture and tons of custoizable components that prioritizes your unique content while seamlessly integrating e-commerce.
Apache License 2.0
31 stars 21 forks source link

๐Ÿ’ก [FEATURE]: Implement Automated Release Notes Generation and Semantic Versioning #228

Closed mihir-bombay-studio closed 8 months ago

mihir-bombay-studio commented 8 months ago

Duplicate check

Related Issues

No response

Feature Description

The goal of this issue is to establish an automated process for creating release notes and tagging, similar to how Shopify's Dawn repository manages its releases (e.g., Dawn v12.0.0). The process should automatically integrate issues into a changelog file.

To achieve this, we need to research and possibly integrate tools and methodologies from the following resources:

  1. GitHub's guide on automatically generated release notes.
  2. The GitHub Changelog Generator tool.

Additionally, the releases should adhere to Semantic Versioning principles. This ensures clarity and consistency in version numbering, especially for users and contributors who depend on versioning for integration and updates.

Motivation

Motivation

Automating the release process and adhering to Semantic Versioning standards will streamline our deployment pipeline, reduce manual errors, and provide clear, standardized communication to users about changes and updates in each release. This system will save time and resources, ensuring a more efficient release process.

Additional Context

Additional Context

File Modifications

No response

Information Completeness

kmalap05 commented 8 months ago

I attempted to set up the process, but I'm struggling with configuring the generation of release notes. Could you provide some guidance or suggestions on how to achieve this?

File: .github/workflows/release.yml

name: Release

on:
  push:
    branches: [main]

jobs:
  release:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "18" # Specify the Node.js version

      - name: Install Dependencies
        run: npm install

      - name: Semantic Release
        run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

File package.json

{
  "name": "shopify-theme",
  "version": "1.0.0",
  "devDependencies": {
    "@semantic-release/changelog": "^6.0.3",
    "@semantic-release/commit-analyzer": "^11.1.0",
    "@semantic-release/git": "^10.0.1",
    "@semantic-release/npm": "^11.0.2",
    "@semantic-release/release-notes-generator": "^12.1.0",
    "semantic-release": "^22.0.12",
    "tailwindcss": "^3.3.5"
  },
  "release": {
    "plugins": [
     "@semantic-release/commit-analyzer",
     "@semantic-release/release-notes-generator",
     ["@semantic-release/npm",{"npmPublish":false}],
     "@semantic-release/changelog",
     "@semantic-release/git"
   ],
   "branches": ["main"]
 }
}
mihir-bombay-studio commented 8 months ago

@kmalap05 can you check how dawn does their releases? because for now we will do the releases exactly like that https://github.com/Shopify/dawn/releases. The resources are just for reference so let's not focus on that as there can be better ways that can get the job done. Which is quite simple make automation for generating release notes whenever a new release is made and the notes will contain the issues finished between the last release and current release along with their links.

kmalap05 commented 8 months ago

Ok, I will go through dawn theme...

kmalap05 commented 8 months ago

Is this what we want, please check it once!

Link to Repo: https://github.com/kmalap05/shopify-theme-skeleton/releases

image

mihir-bombay-studio commented 8 months ago

No we don't need commit info, we need the issue titles + issue number in the list and if possible the usernames of issue contributors just like dawn theme

kmalap05 commented 8 months ago

Ok, I have now gone through the dawn theme. I found one thing that Github already has auto-generate-release-notes feature.

https://dev.to/github/how-to-automatically-generate-release-notes-for-your-project-2ng8 I followed this whole article and found that github automatically generates the release notes on its own.

This is what it got: image

Then we have to select Previous tag: auto and click on generate release notes image

This is what we get

Finally Publishing Release image

So, do we have to automate this thing? Like lets say by two commands

  1. git tag <version>
  2. git push origin <version>

After pushing it should generate the release. So, is that what we have to do?

mihir-bombay-studio commented 8 months ago

Yes this is perfect then, rather than using the issue title we'll use the PR title. The process is also quite straight forward so we don't need any kind automation there. But we do need to create a documentation on how to create new releases, semver for tags. The documentation should have images, it should be to the point, easy to read, comprehensive and tailored specifically to this repository.

mihir-bombay-studio commented 8 months ago

You can now attempt this issue if you want @kmalap05

kmalap05 commented 8 months ago

/attempt

deardigital-evaluation[bot] commented 8 months ago
@kmalap05 has requested to attempt this issue #228. Here are their stats: ๐Ÿ“‡ Username ๐Ÿ’ฏ Points ๐Ÿฅ‡ Badges
kmalap05 47 ๐Ÿงช[Beta Tester]

This message was generated automatically. Please check the contribution guidelines for more details.

kmalap05 commented 8 months ago

Yes this is perfect then, rather than using the issue title we'll use the PR title. The process is also quite straight forward so we don't need any kind automation there. But we do need to create a documentation on how to create new releases, semver for tags. The documentation should have images, it should be to the point, easy to read, comprehensive and tailored specifically to this repository.

It's by default using the PR title. So, should i create a documentation on how to create new releases specifically to this repository?

mihir-bombay-studio commented 8 months ago

Yes exactly, you can create a new release.md file inside the documentation folder. We will add it to wiki later if possible but I'll create another issue for that if needed.

deardigital-evaluation[bot] commented 8 months ago
@kmalap05 has successfully contributed to this issue #228. Here are their updated stats: ๐Ÿ“‡ Username ๐Ÿ’ฏ Points ๐Ÿฅ‡ Badges
kmalap05 55 ๐Ÿงช[Beta Tester]

This message was generated automatically. Please check the contribution guidelines for more details.