English Chinese (Simplified)
set the Release in the specfile to 1
append the changelog entry to the specfile's `%changelog` section
commit the result and tag it with `<name>-<version>-<release>`, i.e. `hellocopr-1.0.0-1`
```
user@host ~/copr-tito-quickdoc % tito tag --use-version 1.0.0
Creating output directory: /tmp/tito
Tagging new version of hellocopr: untagged -> 1.0.0-1
Created tag: hellocopr-1.0.0-1
View: git show HEAD
Undo: tito tag -u
Push: git push --follow-tags origin
```
Push to the commits & tags to the remote using `git push --follow-tags`, and we're ready to release the package on Copr.
Step 2: Publishing the package in a Copr repository
Go to https://copr.fedorainfracloud.org/ and log in. Once done, click on _New Project_ to start creating a repository for our program. On the following input mask,
Under _1. Project information_ -> _Project name_ set the name to what you want your repo to be called - since this will only contain a single package, it makes sense to use projectname = packagename, i.e. _hellocopr_. This is the only settings that cannot be changed later.
Under _2. Build options_ tick all distributions you want to create repositories for - usually all Fedora versions & maybe EPEL versions as well
Under _4. Other Options_ make sure that _Follow Fedora branching_ is ticked, this will ensure that your repository will automatically update for new Fedora release.
Go to _Packages_ -> _New Package_
Under _1. Provide the source_, set the package name & the URL of your git repository
Under _2. How to build SRPM from the source_ select _tito_
Under _3. Generic package setup_ tick the box for _Auto-rebuild_
Your package will appear in the list of packages. Hit _Rebuild_ to trigger a build. The following page lets you change any build options if necessary, we'll just use the defaults, i.e. the options we set in the previous step. Hit _Submit_ and Copr will build the package from the tito tag we created in Step 1.
Once the build has finished, you can test installing the package from Copr by activating your repository. ``` user@host ~/copr-tito-quickdoc % sudo dnf copr enable <username>/hellocopr
user@host ~/copr-tito-quickdoc % sudo dnf install hellocopr ```
Step 3: Automate package (re)-builds
Next, we want to set up Copr to automatically build a new package version whenever we create one, so that we no longer need to log in and trigger one manually. To achieve this, we simply need to trigger a build whenever we push a new tag to the repository.
This requires some configuration both of your Git repository and of the Copr project.