DEV Community

Kien Nguyen Chi
Kien Nguyen Chi

Posted on

1

First time using Conan to release software

Introduction

This week, I worked on my Static-Site Generator - Potato Generator to add package registry. My SSG is in C++ language. I chose Conan, GitLab, to publish my package officially.

Installation Process

  • Firstly, I have to ensure that I have CMake and Conan installed on my machine.
  • Secondly, I have to make sure that I create GitLab account, link it to my GitHub's project, create personal access token to access later.

Set-up Process

  • I build a package with name and version.
conan new potato-generator/1.0.0 -t
Enter fullscreen mode Exit fullscreen mode
  • I build package with user and channel.
conan create . potato-generator/beta
Enter fullscreen mode Exit fullscreen mode
  • I add remote to my project (get project_id from GitLab)
conan remote add gitlab https://gitlab.com/api/v4/projects/<project_id>/packages/conan
Enter fullscreen mode Exit fullscreen mode
  • I add remote for my instance.
conan remote add gitlab https://gitlab.com/api/v4/packages/conan
Enter fullscreen mode Exit fullscreen mode
  • I need to authenticate with my GitLab account. I use username and personal access token from installation step.
conan user <gitlab_username or deploy_token_username> -r gitlab -p <personal_access_token or deploy_token>
Enter fullscreen mode Exit fullscreen mode
  • I publish the package.
conan upload potato-generator/1.0.0@potato-generator/beta --all
Enter fullscreen mode Exit fullscreen mode
  • Finally, I create a git tag for my first version 1.0.0.
git tag -a v1.0.0 -m "Version 1.0.0"
Enter fullscreen mode Exit fullscreen mode

Install my package instructions

To install my package from Conan, please carefully follow this instructions:

  • Install Conan and CMake
  • Install package by Conan command
conan install potato-generator --remote=gitlab
Enter fullscreen mode Exit fullscreen mode
  • Add remote
conan remote add gitlab https://gitlab.com/api/v4/projects/31616511/packages/conan
Enter fullscreen mode Exit fullscreen mode

Otherwise, please take a look at my Release

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay