https://github.com/technote-space/get-next-version-action
GitHub Actions to get next version from commit histories.
https://github.com/technote-space/get-next-version-action
conventional-commits github-actions semantic-versioning
Last synced: 8 months ago
JSON representation
GitHub Actions to get next version from commit histories.
- Host: GitHub
- URL: https://github.com/technote-space/get-next-version-action
- Owner: technote-space
- License: mit
- Created: 2020-02-25T04:23:36.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-08T08:09:51.000Z (almost 2 years ago)
- Last Synced: 2025-04-13T21:53:18.424Z (8 months ago)
- Topics: conventional-commits, github-actions, semantic-versioning
- Language: TypeScript
- Homepage:
- Size: 7.24 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.ja.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Get Next Version Action
[](https://github.com/technote-space/get-next-version-action/actions)
[](https://codecov.io/gh/technote-space/get-next-version-action)
[](https://www.codefactor.io/repository/github/technote-space/get-next-version-action)
[](https://github.com/technote-space/get-next-version-action/blob/main/LICENSE)
*Read this in other languages: [English](README.md), [日本語](README.ja.md).*
コミット履歴から次のバージョンを取得するための GitHub Actions です。
## Table of Contents
Details
- [使用方法](#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)
- [Options](#options)
- [Outputs](#outputs)
- [Action イベント詳細](#action-%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E8%A9%B3%E7%B4%B0)
- [対象イベント](#%E5%AF%BE%E8%B1%A1%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88)
- [Author](#author)
## 使用方法
例:リリースタグを付与
```yaml
on:
pull_request:
branches:
- main
types: [closed]
name: Add release tag
jobs:
tag:
name: Add release tag
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'release/next'
steps:
- name: Get next version
uses: technote-space/get-next-version-action@v1
- uses: actions/github-script@0.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${process.env.NEXT_VERSION}`,
sha: context.sha
})
```
## Options
| name | description | default | required | e.g. |
|:---:|:---|:---:|:---:|:---:|
|MINOR_UPDATE_TYPES|マイナーアップデートのコミットタイプ|`feat`| |`feat, refactor`|
|EXCLUDE_MESSAGES|除外するコミットメッセージ| | |`tweaks`|
|BREAKING_CHANGE_NOTES|破壊的変更を示すキーワード|`BREAKING CHANGE`| |`BREAKING`|
|SET_ENV_NAME|環境変数名|`NEXT_VERSION`| |`NEW_TAG`|
|GITHUB_TOKEN|アクセストークン|`${{github.token}}`|true|`${{secrets.ACCESS_TOKEN}}`|
## Outputs
| name | description | e.g. |
|:---:|:---|:---:|
|current|現在のバージョン|`v1.2.3`|
|next|次のバージョン|`v1.3.0`|
## Action イベント詳細
### 対象イベント
| eventName | action |
|:---:|:---:|
|pull_request, pull_request_target|opened, reopened, synchronize, closed|
## Author
[GitHub (Technote)](https://github.com/technote-space)
[Blog](https://technote.space)