@ribbon-studios/semantic-release-forgejo
v0.1.3
Published
semantic-release plugin to publish a Forgejo release
Readme
@ribbon-studios/semantic-release-forgejo
semantic-release plugin to publish a Forgejo release.
| Step | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| verifyConditions | Verify the presence and the validity of the authentication (set via environment variables) and the other options configuration. |
| publish | Publish a Forgejo Release, optionally uploading file assets. |
| addChannel | Update a Forgejo Release's pre-release field. |
Install
$ bun add -D @ribbon-studios/semantic-release-forgejoUsage
The plugin can be configured in the semantic-release configuration file:
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@ribbon-studios/semantic-release-forgejo",
{
"assets": [
{ "path": "dist/asset.min.css", "name": "CSS distribution" },
{ "path": "dist/asset.min.js", "name": "JS distribution" }
]
}
]
]
}With this example Forgejo releases will be published with the file dist/asset.min.css and dist/asset.min.js.
Configuration
Forgejo authentication
The Forgejo authentication configuration is required and can be set via environment variables.
When creating the token, the minimum required permissions are:
- "Repository" > "Read and Write"
- Repository and Organization Access must be set to "All" for private repos.
When using the ${{ forgejo.token }}, the minimum required permissions are:
contents: writeto be able to publish a Forgejo release
Environment variables
| Variable | Description |
| --------------- | ---------------------------------------------------------- |
| FORGEJO_TOKEN | Required. The token used to authenticate with Forgejo. |
| FORGEJO_URL | The Forgejo server endpoint. |
Options
| Option | Description | Default |
| -------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------- |
| forgejoUrl | The Forgejo server endpoint. | FORGEJO_URL environment variable. |
| assets | An array of files to upload to the release. | - |
| draftRelease | A boolean indicating if a Forgejo Draft Release should be created instead of publishing an actual Forgejo Release. | false |
