-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
40 lines (37 loc) · 1.32 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Semver diff
description: Get the difference between two semantic versions
author: tj-actions
inputs:
initial_release_type:
description: 'Initial release type returned when there are no existing tags.'
required: true
default: 'patch'
outputs:
release_type:
description: 'The difference between two versions by the release type (`major`, `minor`, `patch`, `prerelease`, `build`)'
value: ${{ steps.semver.outputs.release_type }}
new_version:
description: 'The current project version'
value: ${{ steps.semver.outputs.new_version }}
old_version:
description: 'The previous project version'
value: ${{ steps.semver.outputs.old_version }}
runs:
using: 'composite'
steps:
- run: |
bash $GITHUB_ACTION_PATH/entrypoint.sh
id: semver
shell: bash
env:
GITHUB_SERVER_URL: ${{ github.server_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_TOKEN: ${{ inputs.token }}
INPUT_INITIAL_RELEASE_TYPE: ${{ inputs.initial_release_type }}
branding:
icon: copy
color: white