addons-server
addons-server copied to clipboard
Create github action to generate a tag/release from master
Fixes: Manual release process
Description
Github action to create tags for release. You can dispatch via the action web interface or via cli. One day, maybe we will create a tag on every push to master, who knows...
Context
This is a good first step in automating the deployment phase of our release process. We already deploy to stage when a tag is pushed and this automates the generation of the tag, meaning you can deploy to stage via a button 💯
Testing
You can run this action via the github cli
gh workflow run --ref auto-tag
Then select the appropriate workflow
> Tag Repository for Release to Staging (tag-release.yml)
And select your options for push
and tag
Test cases
Invalid tag
-
pass "banana" as tag
-
expect error "does not match the format YYYY.MM.DD"
-
pass "2024-03-12"
-
expect same error as above.
Invalid date
- Pass "1999.12.31"
- expect error "is earlier than current date"
You must provide a valid date string which is greater or equal to today's date.
Fixes: Manual release process
still needs an issue 😛
One day, maybe we will create a tag on every push to master, who knows...
I'd argue if you were tagging on every commit you don't need a tag because they're the same thing (and you wouldn't need a stage server deploying off the tags because it'd be the same code as dev) but I won't get bogged down in hypothetical future scenarios.
It is possible. You'll see a form to provide inputs. Agree this solves the current use case and in a more continuous deployment strategy the benefit of tags does dissipate.
I could imagine a scenario where you create tags that don't get auto deployed to stage and instead you manually trigger a staging deploy and get to select the tag you want. That is much closer to what we do now and still benefits from automation but yeah, it's a next next step in any case.
I'll add an issue.
https://jkrsp.com/deploy-and-rollback-releases-with-github-actions/