Skip to content

Commit d1c97a8

Browse files
authored
Create deploy.yml
1 parent 032dee0 commit d1c97a8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag of the release (existing tag)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
build-and-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout at TAG
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.inputs.tag }}
19+
20+
- name: Set up JDK 11
21+
uses: actions/setup-java@v2
22+
with:
23+
java-version: '11'
24+
distribution: 'adopt'
25+
26+
- name: Build Jar
27+
run: ./gradlew shadowJar
28+
29+
- name: Find JAR output
30+
id: jar
31+
run: |
32+
JAR_PATH=$(find . -name '*.jar' | head -n 1)
33+
echo "jar_path=$JAR_PATH" >> $GITHUB_OUTPUT
34+
35+
- name: Create GitHub Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
tag_name: ${{ github.event.inputs.tag }}
39+
generate_release_notes: true
40+
files: ${{ steps.jar.outputs.jar_path }}
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)