Airfordable / ecs-deploy-task-definition-to-scheduled-task

Creates a new ECS task definition and deploys it to related scheduled tasks within a given cluster
MIT License
23 stars 23 forks source link

Automate release and deployment #9

Open stieg opened 3 years ago

stieg commented 3 years ago

Need to automate this deployment to make project easier to maintain. Ideally deployment would happen if we pushed a signed tag to the main branch. However there is the issue where the updated code has to be available for GitHub actions to use (I am not aware if it being able to use a build artifact at this time... I hope there is a way it can). Ticket tracks figuring out best way to automate this release process and keep it sane.

spyoungtech commented 3 years ago

Could consider using the create-release action, which should do the trick.

A trigger condition like this should get what you want.

on:
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+' # Push events to matching semver-like tags, i.e. v1.0.0, v20.15.10
    branches-ignore:
      - '!main'  # not sure if this works or is needed, but would avoid accidentally(?) creating a release from another branch

New GitHub Actions versions get released to the marketplace upon creation of a release, so, this should work for that use case.

stieg commented 3 years ago

@spyoungtech Thanks for pointing that out. Will look into it.

rinchsan commented 3 years ago

I'm using https://github.com/release-drafter/release-drafter to automatically create a draft release when PR is merged. Last thing you have to do manually is to publish the draft release whenever you want. Semantic version is also decided by release-drafter automatically.

You can activate release-drafter in GitHub Actions (example) .