@ff6347/semantic-release-config
v1.0.6
Published
A sharable semantic release config
Downloads
373
Maintainers
Readme
shareable semantic-release-config
A shareable semantic-release-config. Primary developed @technologiestiftung Berlin and CityLAB Berlin. Since I need to proceed with some projects, moved to pnpm and mise as dev tools I need to maintain a fork for now.
Installation
npm install @ff6347/semantic-release-configUsage
Add file called release.config.js to your repo
module.exports = {
extends: '@ff6347/semantic-release-config',
};If you use a staging/production environment, where staging is the branch staging and production is deployed from main it is wise to add an additional package to do some backmerging. Install it using npm npm i -D @saithodev/semantic-release-backmerge and add it as a plugin to your config, referencing the right branches.
module.exports = {
branches: [
{ name: "main" },
{ name: "staging", channel: "pre/rc", prerelease: "rc" }, // `prerelease` is built with the template `${name.replace(/^pre\\//g, "")}`
],
plugins: [
[
"@saithodev/semantic-release-backmerge",
{
backmergeBranches: [{from: "main", to: "staging"}],
backmergeStrategy: "merge",
},
],
],
}Overwrite possible keys. See the semantic-release docs. If operating with protected branches, you can need to set the option persist-credentials: false in your workflow file on the actions/checkout@v3 step.
steps:
- uses: actions/checkout@v3
with:
persist-credentials: falseSee also this repos .github/workflows/test-and-release.yml how to use this in GitHub Actions.
Needs a Personal Access Token with repo scope to be set as GH_TOKEN in the repo secrets and a NPM_TOKEN with write scope.
Development
Do your thing. Early stages.
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
