DelineaXPM / ansible-core-collection

Ansible collection for Delinea DevOps Secrets Vault
GNU General Public License v3.0
4 stars 1 forks source link

ci: add a new release workflow #44

Closed andrii-zakurenyi closed 1 year ago

andrii-zakurenyi commented 1 year ago

Updates to GitHub workflows:

Updates to Magefile:

Output of mage -l command:

Targets:
  build         πŸ“¦ Build packages the collection into a publishable archive.
  bump          πŸ”Ό Bump increments version in the galaxy file of the collection, using yq.
  changelog     πŸ“œ Changelog helps with creating a release changelog.
  clean         🧹 Clean removes '.artifact/', '.cache/', 'tests/output/' directories from the project.
  doctor        πŸ” Doctor will validate the required tools and environment variables are available.
  init          ✨ Init unfolds initial environment for productive work.
  initCI        🎩 InitCI initializes a new Python virtual environment with given version of Ansible installed.
  publish       πŸš€ Publish sends archived collection to Ansible Galaxy.
  test          πŸ§ͺ Test runs unit and sanity tests.
  testSanity    πŸ§ͺ TestSanity runs sanity tests in containers.
  testUnit      πŸ§ͺ TestUnit runs unit tests in containers.

AB#500727

andrii-zakurenyi commented 1 year ago

Less than a hundred lines of logs for that "build-and-publish" step. Charming :sparkles:

andrii-zakurenyi commented 1 year ago

Not sure what should be the trigger of this workflow though :thinking:

andrii-zakurenyi commented 1 year ago

Will it be good enough? :man_shrugging:

on:
  push:
    tags:
      - v*
sheldonhull commented 1 year ago

@andrii-zakurenyi included some other tasks to help with this, as ideally you can run locally the same as remote. These changes include:

I'm ok merging this as is now to break things into smaller pieces, but there's one last thing to look at afterward... does ansible-galaxy publishing actually create a github release? If not then we can either look at using the github action that does the build and workflow creation, OR we add a github release via gh release create invocation to the mage release process that uses the semver bump. gh release actually adds the tag for us so we don't push manual tags anymore. Makes it nice for the release logs.

Almost no github repos get manual tags due to this github release tag creation process.

Also the token for github release, we can use our team vault and pull or for simplicity we can add as a github secret attached to this.

sheldonhull commented 1 year ago

flipped to draft as do-not-merge is not a blocking condition. I'll catch up next week with you and if you want to pair on anything to wrap it up just let me know. Cheers

sheldonhull commented 1 year ago

Haven't forgotten about this. Will review soon as lots of changes and want to observe the improvements you made. Cheers

sheldonhull commented 1 year ago

Merging. Will handle further review or changes for docs in a different PR. Thank you for this hard work @andrii-zakurenyi