forked from RusherDevelopment/example-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.41 KB
/
Copy pathcd.yml
File metadata and controls
45 lines (38 loc) · 1.41 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Continuous Deployment
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "microsoft"
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
# Get version from gradle.properties setting it as an environment variable
- name: Get Version
id: get_version
run: |
version=$(grep '^plugin_version' gradle.properties | cut -d'=' -f2 | xargs)
echo "version=$version" >> $GITHUB_ENV
- name: Build with Gradle Wrapper
run: ./gradlew build --no-daemon
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: false
generate_release_notes: true
tag_name: v${{ env.version }}
files: build/libs/*.jar