cirrus-ci-docs icon indicating copy to clipboard operation
cirrus-ci-docs copied to clipboard

Idiomatic way of saying: create me a github release on tag push and upload some artifacts to it

Open am11 opened this issue 5 years ago • 3 comments

Currently, we are using a script and calling it from .cirrus.yml to (idempotently) create a GitHub release on tag push and upload artifacts to it. e.g. https://github.com/am11/freebsd-bootstrap-cli/releases/tag/v3.0.2.

💡 since GitHub release is a commonly used feature, it would be nice to have this ability build-in. so we could do something like this in .cirrus.yml:

release:
  on: $CIRRUS_TAG
  provider: github
  token: ENCRYPT['blah']
  artifacts: glob_pattterns
  name: <my-platform-triplet>
  type: {tar, zip, bzip2}

am11 avatar Feb 05 '20 06:02 am11

Please see https://cirrus-ci.org/faq/#is-cirrus-ci-a-delivery-platform

RDIL avatar Feb 05 '20 12:02 RDIL

I think it might be handy to mark some of Cirrus artifacts as GitHub Release artifacts and re-upload them to GitHub as well. Something like:

binary_artifacts:
  path: "build/bin/*"
  github_asset: $CIRRUS_RELEASE != ''

Or publish instead of github_asset and for GitHub repositories it will try to upload to GitHub.

fkorotkov avatar Feb 05 '20 12:02 fkorotkov

Might be a good use case for Starlark: https://cirrus-ci.org/guide/programming-tasks/

fkorotkov avatar Aug 13 '21 20:08 fkorotkov