-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.9 KB
/
release-dev.yml
File metadata and controls
63 lines (53 loc) · 1.9 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
name: Create Release
on:
workflow_dispatch:
jobs:
build:
name: Build ShadowJars and Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: develop # Ensure it works from the develop branch
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '21'
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Get Gradle Version
id: gradle_version
run: echo "GRADLE_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_ENV
- name: Get Commit Hash
id: commit_hash
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Publish to SimpleCloud Repository
run: ./gradlew publishMavenJavaPublicationToSimplecloudRepository
env:
COMMIT_HASH: ${{ env.COMMIT_HASH }}
SIMPLECLOUD_USERNAME: ${{ secrets.SIMPLECLOUD_USERNAME }}
SIMPLECLOUD_PASSWORD: ${{ secrets.SIMPLECLOUD_PASSWORD }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ env.GRADLE_VERSION }}-dev.${{ env.COMMIT_HASH }}
release_name: v${{ env.GRADLE_VERSION }}-dev.${{ env.COMMIT_HASH }}
draft: false
prerelease: true
commitish: develop
body: |
This release contains dev builds for all Gradle modules.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}