-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.36 KB
/
publish.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
name: Publish Jars
permissions:
contents: write
on:
workflow_dispatch:
inputs:
release_name:
description: 'The name of the release'
required: true
type: string
release_body:
description: 'The description of the release'
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- id: values
run: |
echo -e "BODY=${{ inputs.release_body }}\n\n# USE THE NORMAL JAR, NOT THE `-dev` ONE!" >> $GITHUB_OUTPUT
echo "TAG=$( ls -p build/libs/ | grep -v / | head -1 | sed -e 's/\(.*\)\..*/\1/' )" >> $GITHUB_OUTPUT
# wtf did i just write up there
- name: create release
uses: svenstaro/upload-release-action@v2
with:
release_name: ${{ inputs.release_name }}
body: ${{ steps.values.outputs.BODY }}
tag: ${{ steps.values.outputs.TAG }}
file: build/libs/*
file_glob: true