release-me
website·Indexed 30 days ago
https://dalisoft.github.io/release-meA 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.
What's inside release-me
- 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.
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 rootpackage.jsonand provide the necessary environment variables.Install release-me via npm, yarn, or bun
Install therelease-me-shpackage 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 --devQuick 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.shConfigure GitHub Actions for release-me
To automate releases usingrelease-mein 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-releaseCreate and organize blog posts in Docusaurus
Docusaurus blogging features are powered by the
@docusaurus/plugin-content-blogplugin. To create blog posts, add Markdown files or folders to theblogdirectory.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 anindex.mdfile (e.g.,2019-05-30-welcome/index.md), which is useful for co-locating images with the post content. Blog authors can be managed inauthors.yml, and posts support tags.Extract and export GPG key and Key ID
Follow these steps to retrieve the necessary GPG data from your local machine:
- Get the GPG Key ID: List your secret keys to find the long ID associated with your user identity.
- 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-base64Install 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"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).
Publish Docker images to Docker Hub using release-me
Thedockerplugin forrelease-meallows 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,dockerConfigure 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.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.