Repository navigation
67 lines (57 loc) · 1.46 KB
/
Copy pathpublish.yml
File metadata and controls
67 lines (57 loc) · 1.46 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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish
on:
workflow_dispatch:
inputs:
tag:
description: The tag to publish
required: true
push:
tags: [ 'v*.*.*' ]
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Clean Build Directory
run: rm ./build/libs/* -rf
- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Upload Library JAR
uses: actions/upload-artifact@v3
with:
name: lib
path: ./build/libs/math*
publish:
name: Publish to GitHub Releases
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- name: Download Library JAR
uses: actions/download-artifact@v3
with:
name: lib
- name: Publish release
uses: ghalactic/github-release-from-tag@v5
with:
generateReleaseNotes: true
assets: |
- path: math*.jar