-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (38 loc) · 1.28 KB
/
create-version-tag.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
name: Create new version tag
on:
push:
branches: [main]
jobs:
create-new-version-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BOT_TOKEN }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 20
- name: Build
uses: gradle/gradle-build-action@v3
with:
arguments: :xef-openai-client-generator:openaiClientGenerate build
- name: Read version
id: read-version
run: echo "version=$(head -n 1 build/semver/version.txt)" >> "$GITHUB_OUTPUT"
- name: Create new version tag
if: |
contains(steps.read-version.outputs.version, 'alpha') ||
contains(steps.read-version.outputs.version, 'beta') ||
contains(steps.read-version.outputs.version, 'rc')
uses: gradle/gradle-build-action@v3
with:
arguments: createSemverTag -Psemver.stage=auto
- name: Push Tag
if: |
contains(steps.read-version.outputs.version, 'alpha') ||
contains(steps.read-version.outputs.version, 'beta') ||
contains(steps.read-version.outputs.version, 'rc')
run: git push --follow-tags