All Projects → go-semantic-release → Semantic Release

go-semantic-release / Semantic Release

Licence: mit
📦🚀 semantic-release written in go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Semantic Release

Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+4123.89%)
Mutual labels:  semver, gitlab
Gitlab Dashboard
📺 TV dashboard for a global view on Gitlab Pipelines
Stars: ✭ 107 (-5.31%)
Mutual labels:  gitlab-ci, gitlab
Gitlab Ci Pipeline Php
☕️ Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
Stars: ✭ 451 (+299.12%)
Mutual labels:  gitlab-ci, gitlab
bump
🌻 CLI tool to draft a GitHub Release for the next semantic version
Stars: ✭ 40 (-64.6%)
Mutual labels:  semver, semantic-versioning
Kira
🐿 Project management framework with deep philosophy underneath
Stars: ✭ 61 (-46.02%)
Mutual labels:  gitlab-ci, gitlab
Python Semver
Python package to work with Semantic Versioning (http://semver.org/)
Stars: ✭ 264 (+133.63%)
Mutual labels:  semver, semantic-versioning
Commitizen
Create committing rules for projects 🚀 auto bump versions ⬆️ and auto changelog generation 📂
Stars: ✭ 477 (+322.12%)
Mutual labels:  semver, semantic-versioning
gitlab-job-log-viewer
Browser extension for code highlighting raw logs in Gitlab CI
Stars: ✭ 21 (-81.42%)
Mutual labels:  gitlab, gitlab-ci
Kdtool
Kubernetes deployment utility
Stars: ✭ 47 (-58.41%)
Mutual labels:  gitlab-ci, gitlab
Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+706.19%)
Mutual labels:  gitlab-ci, gitlab
Crane
⬆ A GitLab CI ready image to upgrade services in Rancher
Stars: ✭ 90 (-20.35%)
Mutual labels:  gitlab-ci, gitlab
Semver
Semantic Versioning for modern C++
Stars: ✭ 108 (-4.42%)
Mutual labels:  semver, semantic-versioning
gitlab-ci-discord-webhook
⛓ Here's your serverless solution for sending build status from GitLab CI to Discord as webhooks.
Stars: ✭ 32 (-71.68%)
Mutual labels:  gitlab, gitlab-ci
React Native Version
🔢 Version your React Native or Expo app in a `npm version` fashion.
Stars: ✭ 408 (+261.06%)
Mutual labels:  semver, semantic-versioning
gitlab-setup
A Packer / Terraform / Ansible configuration to install Gitlab and Gitlab-CI
Stars: ✭ 53 (-53.1%)
Mutual labels:  gitlab, gitlab-ci
Glci
🦊 Test your Gitlab CI Pipelines changes locally using Docker.
Stars: ✭ 471 (+316.81%)
Mutual labels:  gitlab-ci, gitlab
gitlab-runner
GitLab Runner (Docker image) for ARM devices, this is a mirror repository of
Stars: ✭ 17 (-84.96%)
Mutual labels:  gitlab, gitlab-ci
git-semver
a small cli tool to version your git repository with semantic versioning
Stars: ✭ 19 (-83.19%)
Mutual labels:  semver, semantic-versioning
Semver
Semantic Versioning (semver) library written in golang
Stars: ✭ 804 (+611.5%)
Mutual labels:  semver, semantic-versioning
Gitlab Ci Dashboard
📊 Dashboard for monitoring GitLab CI builds and pipelines for TV
Stars: ✭ 79 (-30.09%)
Mutual labels:  gitlab-ci, gitlab

📦🚀 semantic-release

CI pipeline status Go Report Card PkgGoDev

fully automated package/module/image publishing

A more lightweight and standalone version of semantic-release.

🚨 Upgrade to semantic-release v2 🚨

semantic-release v2 is now available. If you run into any problems, please create a GitHub issue. You can always downgrade to v1 with:

curl -SL https://get-release.xyz/semantic-release/linux/amd64/1.22.1 -o ./semantic-release && chmod +x ./semantic-release

Breaking changes

  • It is now necessary to use double dashes for CLI flags (e.g. --dry)
  • Travis CI support has been removed
  • Some CLI flags have changed:
v1 v2
-vf -f
--noci --no-ci
--ghe-host <host> --provider-opt "github_enterprise_host=<host>"
--travis-com removed
--gitlab --provider gitlab
--gitlab-base-url <url> --provider-opt "gitlab_baseurl=<url>"
--gitlab-project-id <id> --provider-opt "gitlab_projectid=<id>"
--slug --provider-opt "slug=<url>"

How does it work?

Instead of writing meaningless commit messages, we can take our time to think about the changes in the codebase and write them down. Following the AngularJS Commit Message Conventions it is then possible to generate a helpful changelog and to derive the next semantic version number from them.

When semantic-release is setup it will do that after every successful continuous integration build of your default branch and publish the new version for you. This way no human is directly involved in the release process and your releases are guaranteed to be unromantic and unsentimental.

Source: semantic-release/semantic-release#how-does-it-work

You can enforce semantic commit messages using a git hook.

Installation

Option 1: Use the go-semantic-release GitHub Action (go-semantic-release/action)

Option 2: Install semantic-release manually

curl -SL https://get-release.xyz/semantic-release/linux/amd64 -o ./semantic-release && chmod +x ./semantic-release

Plugin System

Since v2, semantic-release is equipped with a plugin system. The plugins are standalone binaries that use hashicorp/go-plugin as a plugin library. semantic-release automatically downloads the necessary plugins if they don't exist locally. The plugins are stored in the .semrel directory of the current working directory in the following format: .semrel/<os>_<arch>/<plugin name>/<version>/. The go-semantic-release plugins API (https://plugins.go-semantic-release.xyz/api/v1/) is used to resolve plugins to the correct binary. The served content of the API can be found here, and a list of all existing plugins can be found here.

Plugin Types

Configuration

Plugins can be configured using CLI flags or the .semrelrc config file. By using a @ sign after the plugin name, the required version of the plugin can be specified. Otherwise, any locally installed version will be used. If the plugin does not exist locally, the latest version will be downloaded. This is an example of the .semrelrc config file:

{
  "plugins": {
    "commit-analyzer": {
      "name": "[email protected]^1.0.0"
    },
    "ci-condition": {
      "name": "default"
    },
    "changelog-generator": {
      "name": "default",
      "options": {
        "emojis": "true"
      }
    },
    "provider": {
      "name": "gitlab",
      "options": {
        "gitlab_projectid": "123456"
      }
    },
    "files-updater": {
      "name": "npm"
    }
  }
}

Example GitHub Actions

For examples, look at the go-semantic-release GitHub Action.

Example GitLab CI Config

GitLab token

It is necessary to create a new Gitlab personal access token with the api scope here. Ensure the CI variable is protected and masked as the GITLAB_TOKEN has a lot of rights. There is an open issue for project specific tokens You can set the GitLab token via the GITLAB_TOKEN environment variable or the -token flag.

.gitlab-ci.yml

 stages:
  # other stages
  - release

release:
  image: registry.gitlab.com/go-semantic-release/semantic-release:latest # Replace this with the current release
  stage: release
  # Remove this if you want a release created for each push to master
  when: manual
  only:
    - master
  script:
    - release

Beta release support

Beta release support empowers you to release beta, rc, etc. versions with semantic-release (e.g. v2.0.0-beta.1). To enable this feature you need to create a new branch (e.g. beta/v2) and check in a .semrelrc file with the following content:

{
  "maintainedVersion": "2-beta"
}

If you commit to this branch a new incremental pre-release is created everytime you push. (2.0.0-beta.1, 2.0.0-beta.2, ...)

Licence

The MIT License (MIT)

Copyright © 2020 Christoph Witzko

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].