npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

publish-gitlab-release

v0.0.6

Published

publish-gitlab-release is a command-line tool that automates the process of creating GitLab releases, including generating changelogs, adding comments to merge requests and linked issues, all while providing flexibility in versioning schemes.

Downloads

3

Readme

publish-gitlab-release

publish-gitlab-release is a command-line tool designed to simplify the process of creating a Git tag and a corresponding GitLab release.

The tool automates the collection of commits made since the last tag, along with all associated merge requests and their linked issues. It also adds comments to merge requests and their linked issues, providing better visibility into the changes included in each release. Additionally, it generates a basic changelog based on raw commit messages.

Unlike some other tools like semantic release, publish-gitlab-release doesn't enforce a specific versioning scheme. It is flexible and works exclusively with GitLab via their API.

🌟 Features

  • Create a Git tag and publish a GitLab release with a single command.
  • Automatically add comments to Merge Requests and their linked issues for better visibility.
  • Generate a basic changelog for the GitLab release.

🧰 Requirements

  • Node 18 (or higher)
  • Gitlab
  • Your latest Git tag is always the tag since last release

🚀 Usage

To use publish-gitlab-release, invoke it using npx with the desired version number:

npx publish-gitlab-release -v "1.2.3" [options]

🛠️ Options

-v, --version (required)

Specifies the version name to be used for the Git tag and the Gitlab release. This option is required and should be used to define the version of the release.

-t, --token (required)

Gitlab API token. Unfortunately the CI_JOB_TOKEN has not enough rights, so that a personal access token or a project access token is required. Go to your project settings and then Access Tokens. Create a token with the scope api and add it to variables under the section CI/CD.

--ref (optional)

Git ref that should be tagged. If provided, the specified Git ref will be tagged with the version defined using the -v option. If not provided, the tool will use the given environment variable CI_COMMIT_SHA from Gitlab pipelines.

--host (optional)

Gitlab URI. Use this option to specify a custom Gitlab host URL. Within Gitlab pipelines the tool will use the environment variables CI_SERVER_PROTOCOL, CI_SERVER_HOST and CI_SERVER_PORT. Fallback is gitlab.com.

--project (optional)

Gitlab project ID. Use this option to specify the ID of the Gitlab project where the release should be published. If not provided, the tool will use the given variable CI_PROJECT_ID from Gitlab pipelines.

💻 CI example

publish-release:
  image: node:20.4.0
  script:
    - npx publish-gitlab-release --version "$VERSION" --token "$GITLAB_RELEASE_TOKEN"
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG == null'

Gitlab comment on a issue referring to a Gitlab release Gitlab comment on a merge request referring to a Gitlab release

👏 Credits