This document outlines the semi-automated release process for Soplang.
Soplang uses a combination of manual binary building and automated processes:
- Manual Building: Binaries for Windows, Linux, and macOS are built manually by the development team
- Automated Docker Images: Docker images are automatically built and pushed to Docker Hub and GitHub Container Registry
- Automated Draft Creation: GitHub Actions creates a draft release with appropriate templates
- Manual Asset Upload: Binaries are uploaded to the draft release
- Manual Publishing: The release is reviewed and published by a team member
-
Create a new branch from
mainusing the naming conventionrelease/vX.Y.Z(e.g.,release/v0.2.0):git checkout main git pull git checkout -b release/v0.2.0
-
Make any final adjustments needed for the release (e.g., update version numbers in files)
-
Push the branch to GitHub:
git push origin release/v0.2.0
-
This will trigger the GitHub Actions workflow to:
- Create a pull request to update the CHANGELOG.md with entries since the last release
- Create a git tag for the release
- Draft a GitHub release with a template for the release notes
-
Review and merge the automatically created PR to update the changelog
After the GitHub Action completes, build the binaries for each platform:
-
Windows Binary:
cd windows ./build_windows.ps1 # Or build_windows.bat
This will create
windows/Output/soplang-setup.exe -
Linux Binary:
cd linux ./build_linux.shThis will create
linux/soplang_<version>_amd64.deb(or .rpm) -
macOS Binary:
cd macos ./build_macos.shThis will create
macos/Soplang-<version>.dmg
- Go to the "Releases" section on GitHub
- Find the draft release created by the workflow
- Upload the binaries you built as assets
- Update the download links in the release description
- Calculate and add SHA256 checksums for each file
- Verify that Docker images have been built and pushed successfully
- Remove the checklist section
- Review the release and publish it
After publishing the release, the Docker workflow will automatically build and push Docker images:
- Verify that the images have been pushed to Docker Hub at soplang/soplang
- Verify that the images have been pushed to GitHub Container Registry at ghcr.io/soplang/soplang
- Test the Docker images by running:
docker pull soplang/soplang:latest docker run -it --rm soplang/soplang -v
After the release is published and verified, merge the release branch back to main:
git checkout main
git merge release/v0.2.0
git push origin mainFor best changelog generation, use conventional commit messages:
feat: add new feature- Appears in the "Added" sectionfix: fix a bug- Appears in the "Fixed" sectionchange: update existing functionality- Appears in the "Changed" sectiondocs: update documentation- Appears in the "Documentation" sectionbuild: update build process- Appears in the "Build" sectionremove: remove feature- Appears in the "Removed" section
For proper attribution in the changelog and release notes:
-
Ensure your git config has your GitHub username as the author name:
git config --global user.name "sharafdin" -
In commit messages, you can manually add attribution like:
feat: add error messages [@sharafdin](https://github.com/sharafdin) -
The automated changelog will create GitHub links for authors in the format:
[@username](https://github.com/username) -
When editing the release notes, ensure usernames are properly linked if the automation doesn't catch them
The Docker automation will create the following tags:
- Full version:
soplang/soplang:0.2.0 - Minor version:
soplang/soplang:0.2 - Major version:
soplang/soplang:0 - Latest tag:
soplang/soplang:latest(only on main branch)
The same tags are also created in the GitHub Container Registry with the prefix ghcr.io/soplang/.
If the automated release process fails:
- Check the GitHub Actions logs for error details
- Make the necessary corrections
- Push the changes to the release branch to trigger the workflow again
If Docker image building fails:
- Check the Docker workflow logs in the GitHub Actions tab
- Common issues include permission problems or missing secrets
- Ensure
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets are configured in the repository