3.1.3 • Published 2 years ago
@qiwi/semrel-metabranch v3.1.3
@qiwi/semrel-metabranch
Semrel plugin for two-way data sync with any remote branch on any release step.
Step | Description |
---|---|
verifyConditions | Performs actions as declared in step options. |
analyzeCommits | As prev. |
verifyRelease | ... |
generateNotes | ... |
prepare | ... |
publish | ... |
addChannel | ... |
success | ... |
fail | ... |
Install
yarn add @qiwi/semrel-metabranch -D
Usage
As a part of plugin declaration:
// .release.rc
{
"plugins": [[
"@qiwi/semrel-multibranch",
{
"verify": {
"action": "fetch",
"branch": "metabranch",
"from": "foo",
"to": "bar"
}
}
]]
}
Action declared in release step:
{
"publish": [[
"@qiwi/semrel-multibranch",
{
"action": "push",
"branch": "metabranch",
"from": "foo/**/*.txt",
"to": "bar",
"message": "commit message"
}
]]
}
GitHub Pages docs pushing example
module.exports = {
debug: true,
branch: 'master',
plugins: [
[
'@qiwi/semrel-metabranch',
{
publish: {
action: 'push',
branch: 'gh-pages',
from: './docs',
to: '.',
message: 'update docs ${nextRelease.gitTag}'
}
}
],
...
]
}
Configuration
Environment variables
Variable | Description |
---|---|
GH_TOKEN or GITHUB_TOKEN | Required. The token used to authenticate with GitHub. |
Options
Option | Description | Default |
---|---|---|
action | Action to perform: fetch /push | |
branch | Branch to push | metabranch |
message | Commit message powered by lodash.template: docs <%= nextRelease.gitTag %> | update meta |
from | Source glob pattern | . (root) |
to | Destination directory | . (root) |
API
TActionOptions
export type TBaseActionOptions = {
branch: string
from: string | string[]
to: string
message: string
}
export type TActionOptionsNormalized = TBaseActionOptions & {
repo: string
cwd: string
temp: string
}
export type TActionType = 'fetch' | 'push'
export type TActionOptions = Partial<TActionOptionsNormalized> & {
repo: string
}
export type TPluginOptions = Partial<TBaseActionOptions> & {
action: TActionType
}
Defaults
export const branch = 'metabranch'
export const from = '.'
export const to = '.'
export const message = 'update meta'
export const defaults = {
branch,
from,
to,
message,
}
License
MIT
3.1.3
2 years ago
3.1.2
2 years ago
3.1.1
2 years ago
3.1.0
2 years ago
3.0.6
2 years ago
3.0.5
2 years ago
3.0.4
2 years ago
3.0.3
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
3 years ago
2.1.0
3 years ago
2.0.0
3 years ago
1.6.7
3 years ago
1.6.6
3 years ago
1.6.4
3 years ago
1.6.5
3 years ago
1.6.3
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.4.4
3 years ago
1.5.0
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.3
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago