-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
110 lines (109 loc) · 3.89 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: "TinySemVer"
description: "Semantic-Versioning with LLMs and without 300,000 lines of JS"
branding:
icon: "at-sign"
color: "purple"
author: "Ash Vardanian, Guillaume de Rouville"
inputs:
dry-run:
description: "Do not create a new tag"
required: false
default: "false"
verbose:
description: "Print more information"
required: false
default: "false"
push:
description: "Push the new tag to the repository"
required: false
default: "false"
major-verbs:
description: "Comma-separated list of major verbs"
required: false
minor-verbs:
description: "Comma-separated list of minor verbs"
required: false
patch-verbs:
description: "Comma-separated list of patch verbs"
required: false
changelog-file:
description: "Path to the changelog file"
required: false
version-file:
description: "Path to the version file"
required: false
update-version-in:
description: "Semicolon-separated list of file paths and regex patterns to update version"
required: false
update-major-version-in:
description: "Semicolon-separated list of file paths and regex patterns to update major version"
required: false
update-minor-version-in:
description: "Semicolon-separated list of file paths and regex patterns to update minor version"
required: false
update-patch-version-in:
description: "Semicolon-separated list of file paths and regex patterns to update patch version"
required: false
default-branch:
description: "Default branch to push the release commit to. Defaults to main"
required: false
git-user-name:
description: "Git user name for commits"
required: false
default: "TinySemVer"
git-user-email:
description: "Git user email for commits"
required: false
default: "[email protected]"
github-token:
description: "GitHub access token to push to protected branches"
required: false
openai-base-url:
description: "OpenAI API base URL"
required: false
default: "https://api.openai.com"
openai-token:
description: "OpenAI API"
required: false
openai-model:
description: "OpenAI model"
required: false
create-release:
description: "Create a GitHub release using the GitHub CLI"
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Run TinySemVer
shell: bash
env:
TINYSEMVER_DRY_RUN: ${{ inputs.dry-run }}
TINYSEMVER_VERBOSE: ${{ inputs.verbose }}
TINYSEMVER_PUSH: ${{ inputs.push }}
TINYSEMVER_MAJOR_VERBS: ${{ inputs.major-verbs }}
TINYSEMVER_MINOR_VERBS: ${{ inputs.minor-verbs }}
TINYSEMVER_PATCH_VERBS: ${{ inputs.patch-verbs }}
TINYSEMVER_CHANGELOG_FILE: ${{ inputs.changelog-file }}
TINYSEMVER_VERSION_FILE: ${{ inputs.version-file }}
TINYSEMVER_UPDATE_VERSION_IN: ${{ inputs.update-version-in }}
TINYSEMVER_UPDATE_MAJOR_VERSION_IN: ${{ inputs.update-major-version-in }}
TINYSEMVER_UPDATE_MINOR_VERSION_IN: ${{ inputs.update-minor-version-in }}
TINYSEMVER_UPDATE_PATCH_VERSION_IN: ${{ inputs.update-patch-version-in }}
TINYSEMVER_REPO_PATH: ${{ github.workspace }}
TINYSEMVER_GIT_USER_NAME: ${{ inputs.git-user-name }}
TINYSEMVER_GIT_USER_EMAIL: ${{ inputs.git-user-email }}
GITHUB_TOKEN: ${{ inputs.github-token || github.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
OPENAI_BASE_URL: ${{ inputs.openai-base-url }}
OPENAI_TOKEN: ${{ inputs.openai-token }}
OPENAI_MODEL: ${{ inputs.openai-model }}
TINYSEMVER_DEFAULT_BRANCH: ${{ inputs.default-branch }}
TINYSEMVER_CREATE_RELEASE: ${{ inputs.create-release }}
run: |
cd $GITHUB_WORKSPACE
python ${{ github.action_path }}/tinysemver/tinysemver.py