-
Notifications
You must be signed in to change notification settings - Fork 25
41 lines (34 loc) · 1.14 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
# 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.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Publish package
on:
release:
types: [created]
permissions:
checks: write
pull-requests: write
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '18'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Publish with Gradle
run: ./gradlew -Pversion=${{ github.event.release.tag_name || '1.0-SNAPSHOT' }} publish
env:
ACTION_DEPLOY_USER: ${{ secrets.ACTION_DEPLOY_USER }}
ACTION_DEPLOY_TOKEN: ${{ secrets.ACTION_DEPLOY_TOKEN }}