The release blueprint is a project blueprint for use with the ACT3 Project Tool. This blueprint defines best practices for releasing projects at ACT3 using dagger.
The blueprint setups up a three-stage release process capable of being ran locally or in the cloud:
- Prepare
- Linters
- Unit tests
- Changelog and release notes
- Semantic versioning
- Approve
- Commit release materials
- Tag release locally
- Publish
- Push tag to remote
- Create release page on remote, optionally with assets
The release process supports:
- Git Remotes
- GitLab
- GitHub
- Project Types
- Go
- Python
- Helm chart versioning and publishing
- Dockerfile image publishing
Add the Release Blueprint to your project by running the blueprint add command:
act3-pt blueprint add https://github.com/act3-ai/blueprint-release.gitComplete the following steps to start using the Release Blueprint in an existing GitHub or GitLab project:
- Clone the project to your local machine
- Run
cd <existing project name> - Run
act3-pt blueprint add https://github.com/act3-ai/blueprint-release.gitto add the Blueprint - Enter values for the inputs of the Blueprint
- Commit changes with
git add .project.yaml && git commit -m "<message>" - Run
act3-pt blueprint renderto render the Blueprint's files - Customize the release process as desired, at a minimum setup access tokens. An
.envrc.privatefile is recommended. - Commit & Push changes with
git push
The Release Blueprint defines the following inputs:
-
host (Required) - Release target host
- Default value: repository URL host, e.g. github.com
-
projectType (Required) - Type of project
- Suppored values: 'Go', 'Python'
- Modifies release
preparefor linting Go or Python files
-
includeGoreleaser (Optional) - Use
goreleaserfor release publish stage- Default value: 'disabled'
- Supported values: 'disabled', 'enabled'
- Only available for Go project type, python may be added in the future
- Adds a
.goreleaser.yamlfile with a configuration suitable for repository host. - Additonal configuration may be necessary.
-
executableName (Optional) - Name of Go executable
- Modifies
.goreleaser.yamlfor build executable name
- Modifies
-
includeDockerPublish (Optional) - Publish container image using Dockerfile
- Modifies release
publishstage to build a Dockerfile and push to an OCI registry - Additional configuration necessary to define OCI reference and registry token
- Modifies release
-
helmChartDir (Optional) - Directory of Helm Chart
- Modifies release
preparestage to bump version of helm chart - Modifies release
publishfor pushing helm chart to an OCI registry - Additional configuration necessary to define OCI reference and registry token
- Modifies release
The Release Blueprint contains files common to projects at ACT3:
- The script is located in
release.sh, with usage docs available withrelease.sh --help. Most modifications should be limited to the scopes ofprepare,approve, andpublishfunctions. - The changelog and release notes configuration file is located in
cliff.toml. It may be used to configure how commit messages are parsed and used to build the changelog or release notes. See git-cliff docs for more information. - Although the
preparestage runs various linters, this blueprint does NOT add configuration files for them. If the default configurations provided by each linter are not suitable please refer to each linters' documentation, see the Config Files section.
This blueprint provides a base outline of a release process. The default usage of some tools may not be suitable depending on a project's requirements. Further configuration may be necessary, and is encouraged.
Although not required, modifications to release.sh should be limited to the scopes of the prepare, approve, and publish functions. Many of the components utilized are available as independent dagger modules, which may be used to replace the more comprehensive release module. Please refer to the documentation for each component for more information.
The main module used in release.sh is the act3-ai/release module. It's serves to wrap the following components into an easily configurable release pipeline.
External Modules:
- shellcheck
- golangci-lint
- gh (GitHub CLI)
- helm
Act3-ai Modules:
To avoid cluttering a repository or introducing configurations not suitable for a project, this blueprint does not initialize config files for linters ran in the prepare stage. Although all linters will work "out-of-box", they will likely report many more issues than desired. Please refer to each linters' documentation for any changes necessary.
- shellcheck wiki, see 'Usage' section.
- markdownlint-cli2 configuration
- yamllint configuration
- golangci-lint configuration
- uv docs, all python linters are ran with
uv