release-me

website·Indexed 30 days ago

https://dalisoft.github.io/release-me

A tool designed to streamline the software release process and manage versioning. It features a plugin system for Git, GitHub Releases, Docker Hub, and npm, and provides specialized support for Rust/Cargo versioning, monorepo workspaces, and GPG/SSH signing for Git tags.

Tokens
4.5K
Snippets
32
Records
49
Agent score
74%

What's inside release-me

  1. Configure the release-me NPM plugin

    The NPM plugin for release-me updates the version field and publishes the npm tag. It is not required for the core functionality of release-me but is used when npm registry publishing is needed.
  2. Automate workspace releases with release-me

    To automate Git tagging, npm publishing, GitHub releases, and changelog generation for packages within a pnpm workspace, you must configure a release script in your root package.json and provide the necessary environment variables.
  3. Install release-me via npm, yarn, or bun

    Install the release-me-sh package as a development dependency using your preferred JavaScript package manager.
    # Using npm
    npm install release-me-sh --save-dev
    
    # Using yarn
    yarn add release-me-sh --dev
    
    # Using bun
    bun add release-me-sh --dev
  4. Quick start with release-me

    release-me is a tool to streamline software releases. It requires no compilation or dependency installation to get started. To use it with default options: 1. Clone the repository into your project folder. 2. Execute the release script located at .release-me/release.sh.
    ./.release-me/release.sh
  5. Configure GitHub Actions for release-me

    To automate releases using release-me in GitHub Actions, you must ensure the checkout step fetches the full history (fetch-depth: 0) and uses a valid GITHUB_TOKEN. The workflow requires specific environment variables for Git identity and GPG signing to successfully execute the release script.
    name: Release
    on:
      push:
        branches: [master]
      pull_request:
        branches: [master]
    
    env:
      CI: true
    
    jobs:
      release:
        runs-on: ubuntu-22.04
        steps:
          - uses: actions/checkout@v4
            with:
              fetch-depth: 0 # REQUIRED: ensures full history is available
              token: ${{ secrets.GITHUB_TOKEN }} # REQUIRED
          - name: Release
            env:
              GIT_USERNAME: ${{ vars.GIT_USERNAME }}
              GIT_EMAIL: ${{ vars.GIT_EMAIL }}
              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # REQUIRED
              GPG_KEY_ID: ${{ vars.GPG_KEY_ID }}
              GPG_KEY: ${{ secrets.GPG_KEY }}
              GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
            shell: bash
            run: |
              git clone https://github.com/dalisoft/release-me.git --depth 1 .release-me
              bash .release-me/release.sh --plugins=git,github-release
  6. Create and organize blog posts in Docusaurus

    Docusaurus blogging features are powered by the @docusaurus/plugin-content-blog plugin. To create blog posts, add Markdown files or folders to the blog directory.

    Post dates are automatically extracted from filenames using the format YYYY-MM-DD-title.md (e.g., 2019-05-30-welcome.md). Alternatively, you can use a folder with an index.md file (e.g., 2019-05-30-welcome/index.md), which is useful for co-locating images with the post content. Blog authors can be managed in authors.yml, and posts support tags.

  7. Extract and export GPG key and Key ID

    Follow these steps to retrieve the necessary GPG data from your local machine:

    1. Get the GPG Key ID: List your secret keys to find the long ID associated with your user identity.
    2. Export the Secret Key: Export the secret key associated with that ID and encode it in base64 format. This base64 string is required for the environment configuration.
    # 1. List secret keys to find the Key ID
    gpg --list-secret-keys
    
    # 2. Export the secret key as base64 (replace KEY_ID with your actual ID)
    gpg --export-secret-keys KEY_ID | base64
    
    # Alternatively, export to a file
    gpg --export-secret-keys KEY_ID | base64 > gpg-base64
  8. Install release-me as a Git submodule

    You can integrate release-me as a Git submodule, although this method is not recommended compared to standard cloning.
    # Add release-me as a submodule
    git submodule add -b master --name release-me --depth=1 -f https://github.com/dalisoft/release-me.git .release-me
    
    # Optional: Commit the submodule addition
    git add -A .release-me
    git commit -m "chore: integration of release-me to my project"
  9. Configure Git identity and signing for release-me

    The release-me Git plugin requires specific environment variables to create and push tags to the origin. Depending on your security requirements, you can configure standard Git identity, GPG signing, or SSH signing.

    Git Identity Variables:

    • GIT_USERNAME: The name of the tag author.
    • GIT_EMAIL: The email of the tag author.

    GPG Signing Variables:

    • GPG_NO_SIGN: Set to skip Git signing.
    • GPG_KEY_ID: The public GPG key/ring ID.
    • GPG_KEY: The private GPG key (Secret).
    • GPG_PASSPHRASE: The private GPG passphrase (Secret).

    SSH Signing Variables:

    • SSH_NO_SIGN: Set to skip Git signing.
    • SSH_PUBLIC_KEY: The public SSH key content (Secret).
    • SSH_PRIVATE_KEY: The private SSH key content (Secret).
    • SSH_KEY_PASSPHRASE: The private SSH passphrase (Secret).
  10. Publish Docker images to Docker Hub using release-me

    The docker plugin for release-me allows you to automatically publish Docker images to Docker Hub during the release process. To use this plugin, you must provide the necessary Docker Hub credentials via environment variables.
    git clone https://github.com/dalisoft/release-me.git --depth 1 .release-me
    bash .release-me/release.sh --plugins=git,docker
  11. Configure SSH signing for Git tags in release-me

    To enable signed Git tags in your release workflow, you must provide your SSH public key, private key, and optionally a passphrase as secrets in your environment. Ensure you have already generated an SSH key and added the public key to your GitHub account before proceeding.
  12. Configure GPG signing for Git tags in release-me

    To enable GPG signing for Git tags in your release workflow, you must first have a GPG key generated and added to your GitHub account. Once the key is ready, you need to extract the Key ID and the secret key, then provide them to the release-me environment via specific variables.