Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📦 NEW: Add release management using Semantic Release #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

michaelborn
Copy link

@michaelborn michaelborn commented Sep 29, 2021

This PR adds:

  1. a Semantic Release workflow, and
  2. a box.json for forgebox integration

for automating releases using Semantic Release, ForgeBox, and the Emoji Log commit standard.

How To Configure:

  1. Go to your user Developer Settings and create a new "Personal Access Token".
  2. In the settings for this repository, create a new "Repository Secret". Name the secret GH_TOKEN and paste the access token you grabbed in step 1.
  3. Log in to Forgebox.io and grab the API token from your profile.
  4. In the settings for this repository, create a new "Repository Secret". Name the secret FORGEBOX_TOKEN and paste the forgebox token.
  5. Install the Emoji Log plugin in your VS Code editor.

Daily Use

From now on, by using the Emoji Log plugin you will get proper Semantic Versioning for your package, automated releases, and super-sweet release notes formatted with emoji headings! 🚀 Each new commit and push to the master branch will trigger a new release 📦 . Most of those releases will be minor or patch releases, but any ‼ BREAKING commit will trigger a major release. This ensures that users pinned to a specific major version (like rememberMe^1.0.0) will get all the updates for that major version without jumping to the next major version and having to deal with a breaking change. (More on versioning below.)

How It Works:

On push, Semantic Release will:

  1. Read all commits since the last release version
  2. Inspect the commit messages using the EmojiLogCommitParser
  3. Set the new version number based on the parsed commits (more later)
  4. Push the new release to ForgeBox
  5. Create a new release on Github

How Are the Release Version Numbers Determined?

The version number is set using a combination of Emoji Log and Semantic Versioning:

  1. Commits beginning with ‼ BREAKING will bump the major version and reset the minor and patch version. (X.0.0)
  2. Commits beginning with 📦 NEW: will bump the minor version and reset the patch version. (0.X.0)
  3. All other commits will bump the patch version. (0.0.X)

This github action adds a Semantic Release workflow to the github actions commit. On push, Semantic Release will:
1. Read all commits since the last release version
2. Inspect the commit messages using the `EmojiLogCommitParser`
3. Set the new version number based on the parsed commits (more later)
4. Push the new release to ForgeBox
5. Create a new release on Github

The version number is set using a combination of Emoji Log and Semantic Versioning:

1. Commits beginning with `‼ BREAKING` will bump the major version and reset the minor and patch version. (`X.0.0`)
2. Commits beginning with `📦 NEW:` will bump the minor version and reset the patch version. (`0.X.0`)
3. All other commits will bump the patch version. (`0.0.X`)
It's important to keep a box.json in place for integration with forgebox. For example, the `version` property is used when automating releases, and the `repository`, `slug`, and `name` are all used (among others) when showing the package in ForgeBox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant