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

Chore/add semantic release #3

Merged
merged 3 commits into from
Jul 7, 2023
Merged

Conversation

johnrwatson
Copy link
Owner

@johnrwatson johnrwatson commented Jul 7, 2023

  • Setup semantic release
    - Semantic Release builds on the rules from the precommit hook and asserts that the expected release happens. In this github workflow it runs on all commits. On main it will execute the actual release of the tag onto main (creating a real release version). On all other branches it will simply log output the version that would be created if the PR was merged (assuming that it's up to date from a git perspective with main). This can be a handy way for developers to check the release impact they intend to create will happen before they merge.
    - It's noteworthy here that the frontend and backend are going to be tagged as a version together. This may or may not be ideal depending on organisation choice. Normally the Frontend and Backend would have separate repositories where each are individually versioned. When separated, it also allows you to individually build and ship each component which may be rewarding from a velocity standpoint. In this case, where they are so closely tied together and probably direct dependent on each other at a chosen version (and for the sake of keeping things simple) I have tagged the repository as a single tag, rather than splitting my application variant.
    - Because I plan to hook github workflows together, I am going to use a personal github token coined PA_TOKEN. This is the user token that will conduct the release of the tag, but also trigger any downstream workflows on the tag itself. If you use the default GITHUB_TOKEN it will stop you chaining workflows together to prevent workflow run-away. If this repository is to be forked the PA_TOKEN variable will need added to the repository as an action secret to allow semantic release to happen correctly. The token will need read and write into the repository code, along with conducting releases. See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens for how to create user tokens.

See content of log output for this PR:

[7:14:12 PM] [semantic-release] › ⚠  Skip step "prepare" of plugin "@semantic-release/git" in dry-run mode
[7:14:12 PM] [semantic-release] › ⚠  Skip 1.0.0 tag creation in dry-run mode
[7:14:12 PM] [semantic-release] › ✔  Published release 1.0.0 on default channel
[7:14:12 PM] [semantic-release] › ℹ  Release note for version 1.0.0:
Info: If chore/add-semantic-release is merged it will create the above release [DRY RUN ABOVE, ASSUMING SYNCED WITH MAIN]

@johnrwatson johnrwatson merged commit 9941166 into main Jul 7, 2023
@johnrwatson johnrwatson deleted the chore/add-semantic-release branch July 8, 2023 09:37
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