返回排行榜

actions/create-release

JavaScript

An Action to create releases via the GitHub Release API

releaserelease-automationactionsgithub-actionsgithub
Star 增长趋势
Star
1.4k
Forks
328
周增长
Issues
38
5001k
2023年1月2024年3月2025年5月2026年7月
制品库npmnpm install create-release
README

GitHub Action - Releases API

Please note: This repository is currently unmaintained by a team of developers at GitHub. The repository is here and you can use it as an example, or in Actions. However please be aware that we are not going to be updating issues or pull requests on this repository.

Maintained Actions:

To reflect this state we’ve marked this repository as Archived.

If you are having an issue or question about GitHub Actions then please contact customer support.

If you have found a security issue please submit it here.


This GitHub Action (written in JavaScript) wraps the GitHub Release API, specifically the Create a Release endpoint, to allow you to leverage GitHub Actions to create releases.

GitHub Actions status

Usage

Pre-requisites

Create a workflow .yml file in your .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.

Inputs

For more information on these inputs, see the API Documentation

  • tag_name: The name of the tag for this release
  • release_name: The name of the release
  • body: Text describing the contents of the release. Optional, and not needed if using body_path.
  • body_path: A file with contents describing the release. Optional, and not needed if using body.
  • draft: true to create a draft (unpublished) release, false to create a published one. Default: false
  • prerelease: true to identify the release as a prerelease. false to identify the release as a full release. Default: false
  • commitish : Any branch or commit SHA the Git tag is created from, unused if the Git tag already exists. Default: SHA of current commit
  • owner: The name of the owner of the repo. Used to identify the owner of the repository. Used when cutting releases for external repositories. Default: Current owner
  • repo: The name of the repository. Used to identify the repository on which to release. Used when cutting releases for external repositories. Default: Current repository

body_path

The body_path is valuable for dynamically creating a .md within code commits and even within the Github Action steps leading up to the create-release.

Outputs

For more information on these outputs, see the API Documentation for an example of what these outputs look like

  • id: The release ID
  • html_url: The URL users can navigate to in order to view the release. i.e. https://github.com/octocat/Hello-World/releases/v1.0.0
  • upload_url: The URL for uploading assets to the release, which could be used by GitHub Actions for additional uses, for example the @actions/upload-release-asset GitHub Action

Example workflow - create a release

On every push to a tag matching the pattern v*, create a release:

on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Create Release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          body: |
            Changes in this Release
            - First Change
            - Second Change
          draft: false
          prerelease: false

This will create a Release, as well as a release event, which could be handled by a third party service, or by GitHub Actions for additional uses, for example the @actions/upload-release-asset GitHub Action. This uses the GITHUB_TOKEN provided by the virtual environment, so no new token is needed.

Contributing

We would love you to contribute to @actions/create-release, pull requests are welcome! Please see the CONTRIBUTING.md for more information.

License

The scripts and documentation in this project are released under the MIT License

相关仓库
semantic-release/semantic-release

📦🚀 Fully automated version management and package publishing

JavaScriptnpmMIT Licenseautomationchangelog
semantic-release.org
23.9k1.8k
XIU2/UserScript

🐵 自用的一些乱七八糟 油猴脚本~

JavaScriptnpmGNU General Public License v3.0userscriptsteam
greasyfork.org/users/457025
9.8k697
release-it/release-it

🚀 Automate versioning and package publishing

JavaScriptnpmMIT Licenserelease-automationpublish
9k568
conventional-changelog/standard-version

:trophy: Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org

JavaScriptnpmISC Licenseversionrelease
8k764
olivierlacan/keep-a-changelog

If you build software, keep a changelog.

HamlMIT Licensechangelogversioning
keepachangelog.com
6.6k3.5k
intuit/auto

Generate releases based on semantic version labels on pull requests.

TypeScriptnpmMIT Licensereleaseauto-release
intuit.github.io/auto/
2.5k220
dyrector-io/dyrectorio

dyrector.io is a self-hosted continuous delivery & deployment platform with version management.

TypeScriptnpmApache License 2.0developergolang
dyrectorio.com
1.8k129
dephell/dephell

:package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.

PythonPyPIMIT Licensedependenciesproject-management
dephell.org
1.8k115
release-plz/release-plz

Publish Rust crates from CI with a Release PR.

Rustcrates.ioApache License 2.0cirelease
release-plz.dev
1.4k180
jreleaser/jreleaser

:rocket: Release projects quickly and easily with JReleaser

JavaMavenApache License 2.0javarelease
jreleaser.org
1.2k156
pypa/gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI, the tokenless way: https://github.com/marketplace/actions/pypi-publish

PythonPyPIBSD 3-Clause "New" or "Revised" Licensegithub-actionpython
packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
1.2k118
python-semantic-release/python-semantic-release

Automating Releases via SemVer and Commit Message Conventions

PythonPyPIMIT Licensepythonsemantic-release
python-semantic-release.readthedocs.io/en/stable/
1k272