Minimize JS/CSS on Release

Hi everybody,

I am quite new to CI in Gitlab, but I try to learn more and more. I can do the easy things like “Deploy to WebServer” and so on, but now I have a problem I can’t solve without help:

I created a .gitlab-ci.yaml to create a release, whenever a tag is created. That works fine. Now I want to minimize all JS and CSS-Files for the release. In my repository I only want the “normal” ones, but in the release-zip there should be online the style.min.css (instead of style.css)

My Problem is: How can I change files for a release, without commiting them to the repository?

My working YAML is looking like this:
stages:

  • release

release_job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created manually
script:
- echo “GOGO GADGET RELEASE”
release:
name: ‘Release $CI_COMMIT_TAG’
description: ‘Created using the release-cli $EXTRA_DESCRIPTION’ # $EXTRA_DESCRIPTION must be defined
tag_name: ‘$CI_COMMIT_TAG’ # elsewhere in the pipeline.
ref: ‘$CI_COMMIT_TAG’

Kind Regards
Dominik