generated from project-mirai/mirai-console-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 17
52 lines (42 loc) · 1.16 KB
/
Release.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
name: Release
# Controls when the action will run.
on:
# Triggers the workflow on push events
push:
tags:
- '*'
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout
uses: actions/checkout@v4
# Get tag version from ref
- name: Get tag version
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# Setup JDK
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: 11
cache: 'gradle'
# Validate Gradle Wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v3
# Build
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew buildPlugin
# Create Release
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/mirai/*.jar"
artifactContentType: application/jar
tag: ${{ steps.vars.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}