dyversion
The release.sh
script in this repository does the following:
- Reads the non-committed file
current_version.txt
. It contains the "current release" in the shape ofmajor.minor
, but could be whatever you want. - Appends today's date in the shape of
YYYY-MM-DD
. This is the release-id. - Replaces the template
{{VERSION}}
inmain.aplf
with this release-id. - Lays down a git "tag" to be the release-id.
- Creates a new GitHub release.
- Uploads the file
main.aplf
to the release. - Replaces the patched
main.aplf
with the backupsed
created, so that the template remains.
A git tag is a 'bookmark' to a commit SHA. It can be anything. We're using a tagging strategy of
major.minor-YYYY-MM-DD
A release is a tag. We inject the tag name into a function called Version
, residing in main.aplf
before we create, and upload the asset to a GitHub release.
To make a new release using this approach, you need:
- GitHub token available as an environment variable called
GITHUB_TOKEN
. - The jq utility (a streaming json processor) installed.