-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.13 KB
/
create-prerelease.yaml
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: Create Pre-Release Draft
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-indev[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
jobs:
create-prerelease:
name: Create Pre-Release Draft ${{ github.ref_name }}
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 22
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Save version name
run: |
tag_name="$GITHUB_REF_NAME"
tag_name="${tag_name#v}"
printf 'CZD_BOT_VERSION_NAME=%s\n' "$tag_name" >> "$GITHUB_ENV"
- name: Run Gradle
run: ./gradlew build :main:createGzippedExecutable
- name: Create pre-release draft ${{ github.ref_name }}
uses: softprops/action-gh-release@v2
with:
name: Version ${{ env.CZD_BOT_VERSION_NAME }}
prerelease: true
fail_on_unmatched_files: true
files: czd-bot-*.gz
draft: true