sem-rel
Configurable Semantic Release module. Options are provided to modify yourreleaserc file on demand for testing purposes (e.g. local/dry/no-ci runs,
unlisted branches etc).
Usable with Github or Gitlab with a PAT token.
Installation
dagger install github.com/mjb141/sem-rel@b3583bda583de37c780a511fb0c59594665fc3a6
Entrypoint
Return Type
SemRel
Example
dagger -m github.com/mjb141/sem-rel@b3583bda583de37c780a511fb0c59594665fc3a6 call \
func (m *myModule) example() *SemRel {
return dag.
SemRel()
}
@function
def example() -> dag.SemRel:
return (
dag.sem_rel()
)
@func()
example(): SemRel {
return dag
.semRel()
}
Types
SemRel 🔗
configure() 🔗
Configure Semantic Release
Return Type
SemRel !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
addCurrentBranch | Boolean ! | false | Add the current branch to the 'branches' key in your .releaserc file |
dryRun | Boolean ! | true | The Semantic Release --dry-run flag for testing |
checkIfCi | Boolean ! | false | The Semantic Release --check-if-ci flag for local execution |
Example
dagger -m github.com/mjb141/sem-rel@b3583bda583de37c780a511fb0c59594665fc3a6 call \
configure --add-current-branch boolean --dry-run boolean --check-if-ci boolean
func (m *myModule) example(addCurrentBranch bool, dryRun bool, checkIfCi bool) *SemRel {
return dag.
SemRel().
Configure(addCurrentBranch, dryRun, checkIfCi)
}
@function
def example(add_current_branch: bool, dry_run: bool, check_if_ci: bool) -> dag.SemRel:
return (
dag.sem_rel()
.configure(add_current_branch, dry_run, check_if_ci)
)
@func()
example(addCurrentBranch: boolean, dryRun: boolean, checkIfCi: boolean): SemRel {
return dag
.semRel()
.configure(addCurrentBranch, dryRun, checkIfCi)
}
release() 🔗
Run Semantic Release
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
releaserc | File | - | .releaserc (or equivalent), defaults to .releaserc.json |
dir | Directory | - | Directory containing app that should be assessed for release |
provider | String ! | "Github" | Git provider, Github or Gitlab. Determines if GH_TOKEN or GL_TOKEN is provided to Semantic Release |
token | Secret ! | - | PAT for either Github or Gitlab. Will be provided to Semantic Release as GH_TOKEN or GL_TOKEN |
Example
dagger -m github.com/mjb141/sem-rel@b3583bda583de37c780a511fb0c59594665fc3a6 call \
release --provider string --token env:MYSECRET
func (m *myModule) example(provider string, token *Secret) *Container {
return dag.
SemRel().
Release(provider, token)
}
@function
def example(provider: str, token: dagger.Secret) -> dagger.Container:
return (
dag.sem_rel()
.release(provider, token)
)
@func()
example(provider: string, token: Secret): Container {
return dag
.semRel()
.release(provider, token)
}