-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (44 loc) · 1.23 KB
/
Copy pathbuild.yml
File metadata and controls
54 lines (44 loc) · 1.23 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
53
54
name: build
on:
pull_request:
branches: ["ver/*"]
push:
branches: ["ver/*"]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: setup jdk
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'microsoft'
cache: gradle
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: rename
run: |
rm build/libs/*-sources.jar
mv build/libs/*.jar ./
- name: capture build artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./*.jar
- name: Release
if: github.event_name != 'pull_request'
uses: marvinpinto/action-automatic-releases@master
with:
title: "LT-Rynek ${{ env.BRANCH_NAME }}"
automatic_release_tag: "${{ env.BRANCH_NAME }}"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: "*.jar"
prerelease: false