-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.17 KB
/
build.yml
File metadata and controls
52 lines (43 loc) · 1.17 KB
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
name: Publish
on: push
jobs:
vars:
name: Get Variables
runs-on: ubuntu-22.04
outputs:
version: ${{steps.version.outputs.version}}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 150
fetch-tags: "true"
- name: Fetch Tags
run: git fetch --tags
- name: Version
id: version
uses: paulhatch/semantic-version@v5.4.0
with:
version_format: "${major}.${minor}.${patch}"
search_commit_body: true
bump_each_commit: true
publish:
name: Publish Code as Github Package - ${{ inputs.version }}
runs-on: ubuntu-22.04
needs: vars
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Publish
run: ./gradlew :publish
env:
VERSION: ${{ needs.vars.outputs.version }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}