-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (45 loc) · 1.24 KB
/
build-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
42
43
44
45
46
name: Gradle Build
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- name: Build
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: ./gradlew build
env:
ORG_GRADLE_PROJECT_pluginVersion: 0.1-DEV
- name: Build and Sign
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: ./gradlew signPlugin
env:
ORG_GRADLE_PROJECT_pluginVersion: ${{ github.ref_name }}
CERTIFICATE_CHAIN: ${{ secrets.SIGNING_CERTIFICATE }}
PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
- name: Create Draft Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
draft: true
prerelease: false
files: |
build/distributions/*-signed.zip
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: plugin
path: build/distributions/
if-no-files-found: error