Simple pipeline to make a zip with some repo files and add it to releases

Hello, I just want to make a simple CD/CI pipeline that does the following:

  • Each time a new commit is done to the main branch, a zip is generated with some files from the repo (not all files)
  • A new release is created (tag) with the version given in the commit (for example if the commit has v0.99 that will be the new release created)

So far I’ve come up to this gitlab-ci.yml file

image: "ubuntu"

  EXPORT_NAME: ProjectName

    - mkdir ./datafiles
    - cp ./contents/* ./datafiles
      - ./contents
      - main

My problem right now is that the generated artifact name does not contain the version (it is named only) and i also dont know how to generate a new release and include the generated artifact.

I’m a newbie in all of this Gitlab CD/CI stuff, can somebody lend me a hand?

1 Like

Hi RabidTunes,
I was looking to do exactly the same.
According to the documentation, you can only have the CI_COMMIT_TAG in a pipeline for tags. Look here: Predefined variables reference | GitLab