-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1 KB
/
publish.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
name: "Release"
on:
release:
types:
- "released"
jobs:
build:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@master"
- uses: "graalvm/setup-graalvm@v1"
with:
java-version: "23"
distribution: "graalvm-community"
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: "gradle"
- uses: "actions/cache@master"
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/settings.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish
run: |
[[ "${{ github.event.release.tag_name }}" =~ ^[0-9]+(\.[0-9]+)*$ ]] || exit -1
chmod +x gradlew
./gradlew publishPlugins -Pversion="${{ github.event.release.tag_name }}" -Pgradle.publish.key="${{ secrets.GRADLE_PUBLISH_KEY }}" -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}