Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

📦:octocat: GitHub Action for creating changelog based GitHub Releases

License

NotificationsYou must be signed in to change notification settings

brainelectronics/changelog-based-release

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create releaseReleaseLicense: MIT

GitHub Action for creating changelog based GitHub Releases


Requirements

As this Action uses thechangelog2versionto parse and extract informations from a changelog, the requirements for thechangelog format have to meet certain criterias.

Tag section

The header of an entry in the changelog has to follow the following format ifnot specified differently with theversion-line-regex and/orsemver-line-regexoption in the workflow.

This changelog entry shall follow thesemantic version pattern and shall match the followingpattern:

## [x.y.z] - yyyy-mm-dd or## [x.y.z] - yyyy-mm-ddThh:mm:ss

The line shall start with two hashtags (##) followed by a single space ().The semver version withx,y andz as non-negative integers, seperatedby a dot (.) and surrounded by square brackets ([]). Followed by a space(), a dash (-), another space () and theISO8601 formatteddate. Additional timestamps after the date, seperated from the date by asingle space () or a capital (T), are optional. The semantic version taginside the square brackets ([]) supports the full semantic versioning scope.

Examples:

  • ## [1.2.3] - 2022-11-13
  • ## [1.2.3-alpha-a.b-c-somethinglong+build.1-aef.1-its-okay] - 2022-11-13T12:34:56

Thechangelog of this repo is an example of how the changelogshall look like to be parsable with the default changelog2version settings.

Usage

Basic usage

With the default values used a GitHub release and tag based on the changeloglocated in the project root will be created. For further details check thecustomizing section

Seeaction.yml

name:Create releaseon:push:branches:      -mainpermissions:contents:writejobs:release:runs-on:ubuntu-latestname:Releasesteps:      -name:Checkoutuses:actions/checkout@v3      -name:'Create changelog based release'uses:brainelectronics/changelog-based-release@v1

Customizing

The following are optional asstep.with keys

NameTypeDescription
github-tokenStringSecret GitHub Personal Access Token. Defaults to${{ github.token }}
changelog-pathStringPath to changelog used for releasing. Default tochangelog.md
tag-name-prefixStringPrefix of tag name before extraced x.y.z from changelog, e.g.v to getv1.2.3
tag-name-extensionStringExtension of tag name after extracted x.y.z from changelog, e.g.${{ github.sha }} to get1.2.3${{ github.sha }}. Defaults to-rc${{ github.run_number }}.dev${{ github.event.number }} e.g.1.2.3-rc21.dev
release-name-prefixStringPrefix of release name before extracted x.y.z from changelog, e.g.Release of to getRelease of 1.2.3
release-name-extensionStringExtension of release name after extracted x.y.z from changelog, e.g.-rc to get1.2.3-rc. Defaults to-rc${{ github.run_number }}.dev${{ github.event.number }} e.g.1.2.3-rc21.dev
draft-releaseBooleanIndicator of whether or not this release is a draft. Defaults tofalse
prereleaseBooleanIndicator of whether or not is a prerelease. Defaults tofalse
steps:  -name:Checkoutuses:actions/checkout@v3  -name:'Create changelog based release'uses:brainelectronics/changelog-based-release@v1with:# note you'll typically need to create a personal access token# with permissions to create releases in the other repo# or you set the "contents" permissions to "write" as in this examplegithub-token:${{ secrets.CUSTOM_GITHUB_TOKEN }}changelog-path:path/to/changelog.mdtag-name-prefix:'v'tag-name-extension:'+${{ github.sha }}'release-name-prefix:'Release of'release-name-extension:'-rc'draft-release:trueprerelease:true

Outputs

The Action provides the following output variables

NameTypeDescription
latest-descriptionStringContent of latest changelog entry
latest-versionStringLatest changelog version
steps:  -name:Checkoutuses:actions/checkout@v3  -name:'Create changelog based release'uses:brainelectronics/changelog-based-release@v1id:changelog-release  -name:Report action outputrun:|      echo "Latest changelog change description: ${{ steps.changelog-release.outputs.latest-description }}"      echo "Latest changelog version: ${{ steps.changelog-release.outputs.latest-version }}"

Permissions

This Action requires the following permissions on the GitHub integration token:

permissions:contents:write

GitHub token permissionscan be set for an individual job, workflow, or for Actions as a whole.

License

The scripts and documentation in this project are released under theMIT License

About

📦:octocat: GitHub Action for creating changelog based GitHub Releases

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp