generated from Kord-Extensions/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.31 KB
/
root.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
name: Build & Publish
on:
push:
branches:
- root
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
dependency-graph: generate-and-submit
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: JARs
path: build/libs/*.jar
if-no-files-found: warn
- name: Validate version
id: version
run: |
VERSION=$(cat .version)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
if git show-ref --tags --verify --quiet "refs/tags/${VERSION}"; then
echo "Version ${VERSION} was already released"
exit 0
fi
- name: Release artifacts
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
automatic_release_tag: ${{ steps.version.outputs.version }}
files: |
build/libs/*.jar
LICENSE.md