addons-server icon indicating copy to clipboard operation
addons-server copied to clipboard

Create github action to generate a tag/release from master

Open KevinMind opened this issue 11 months ago • 3 comments

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

  1. pass "banana" as tag

  2. expect error "does not match the format YYYY.MM.DD"

  3. pass "2024-03-12"

  4. expect same error as above.

Invalid date

  1. Pass "1999.12.31"
  2. expect error "is earlier than current date"

You must provide a valid date string which is greater or equal to today's date.

KevinMind avatar Mar 12 '24 19:03 KevinMind

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.

eviljeff avatar Mar 13 '24 14:03 eviljeff

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.

KevinMind avatar Mar 13 '24 17:03 KevinMind

https://jkrsp.com/deploy-and-rollback-releases-with-github-actions/

KevinMind avatar Mar 21 '24 08:03 KevinMind