-
Notifications
You must be signed in to change notification settings - Fork 39
55 lines (48 loc) · 1.21 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Publish
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
permissions:
actions: write
id-token: write
contents: write
jobs:
precheck:
name: Precheck
runs-on: ubuntu-latest
outputs:
version: ${{ steps.vars.outputs.VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
publish:
name: Publish
needs: [precheck]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Version
id: vars
shell: bash
run: |
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
echo ${{ github.event.inputs.version }} > VERSION
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ vars.JAVA_VERSION }}
distribution: ${{ vars.JAVA_DISTRO }}
cache: gradle
- name: Deploy
env:
GRGIT_USER: ${{ secrets.GIT_USER }}
GRGIT_PASS: ${{ secrets.GIT_ACCESS_TOKEN }}
run: |
./gradlew -Prelease=true -PreproducibleBuild=true gitPublishPush -S