141 lines
3.3 KiB
YAML
141 lines
3.3 KiB
YAML
|
suites:
|
||
|
- name: default
|
||
|
yaml:
|
||
|
name: Bump Version
|
||
|
on:
|
||
|
push:
|
||
|
jobs:
|
||
|
bump-version:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: version-bump
|
||
|
uses: ./action
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
tests:
|
||
|
- message: no keywords
|
||
|
expected:
|
||
|
version: 1.0.1
|
||
|
- message: feat
|
||
|
expected:
|
||
|
version: 1.1.0
|
||
|
- message: minor
|
||
|
expected:
|
||
|
version: 1.2.0
|
||
|
- message: BREAKING CHANGE
|
||
|
expected:
|
||
|
version: 2.0.0
|
||
|
- message: major
|
||
|
expected:
|
||
|
version: 3.0.0
|
||
|
- message: pre-alpha
|
||
|
expected:
|
||
|
version: 3.0.1-alpha.0
|
||
|
- message: pre-beta
|
||
|
expected:
|
||
|
version: 3.0.1-beta.0
|
||
|
- message: pre-rc
|
||
|
expected:
|
||
|
version: 3.0.1-rc.0
|
||
|
- name: no-push
|
||
|
yaml:
|
||
|
name: Do Nothing
|
||
|
on:
|
||
|
push:
|
||
|
jobs:
|
||
|
bump-version:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: version-bump
|
||
|
uses: ./action
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
push: false
|
||
|
tests:
|
||
|
- message: no keywords
|
||
|
expected:
|
||
|
version: 3.0.1-rc.0
|
||
|
- name: custom-wording
|
||
|
yaml:
|
||
|
name: Bump Version (Custom Wording)
|
||
|
on:
|
||
|
push:
|
||
|
jobs:
|
||
|
bump-version:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: version-bump
|
||
|
uses: ./action
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
minor-wording: custom-minor
|
||
|
major-wording: custom-major
|
||
|
rc-wording: custom-pre
|
||
|
tests:
|
||
|
- message: custom-minor
|
||
|
expected:
|
||
|
version: 3.1.0
|
||
|
- message: custom-major
|
||
|
expected:
|
||
|
version: 4.0.0
|
||
|
- message: custom-pre
|
||
|
expected:
|
||
|
version: 4.0.1-pre.0
|
||
|
- name: null-default
|
||
|
yaml:
|
||
|
name: Bump Version (Default="Minor")
|
||
|
on:
|
||
|
push:
|
||
|
jobs:
|
||
|
bump-version:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: version-bump
|
||
|
uses: ./action
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
default: minor
|
||
|
patch-wording: patch
|
||
|
tests:
|
||
|
- message: no hint
|
||
|
expected:
|
||
|
version: 4.1.0
|
||
|
- message: patch
|
||
|
expected:
|
||
|
version: 4.1.1
|
||
|
- name: custom-tag-prefix
|
||
|
yaml:
|
||
|
name: Bump Version (Custom Tag Prefix)
|
||
|
on:
|
||
|
push:
|
||
|
jobs:
|
||
|
bump-version:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- id: version-bump
|
||
|
uses: ./action
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
with:
|
||
|
tag-prefix: 'v'
|
||
|
tests:
|
||
|
- message: no keywords
|
||
|
expected:
|
||
|
version: 4.1.2
|
||
|
tag: v4.1.2
|
||
|
actionFiles:
|
||
|
- index.js
|
||
|
- Dockerfile
|
||
|
- package.json
|
||
|
- package-lock.json
|
||
|
- action.yml
|
||
|
image: catthehacker/ubuntu:act-latest
|