-
Notifications
You must be signed in to change notification settings - Fork 165
49 lines (48 loc) · 1.82 KB
/
new-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
47
48
49
name: "New plugin release"
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
make-new-release:
name: "Releasing plugin"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'zulu'
- name: Restore Gradle caches
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- name: Restore Gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Publish plugin
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GITHUB_KEY: ${{ secrets.GithubKey }}
run: ./plugin/gradlew -p ./plugin publishPlugins --no-daemon
- name: Create new Github release
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GITHUB_KEY: ${{ secrets.GITHUB_TOKEN }}
run: ./plugin/gradlew -p ./plugin githubRelease --no-daemon
- name: Update VERSION_LATEST_RELEASE to new published version
run: cp plugin/VERSION_CURRENT.txt plugin/VERSION_LATEST_RELEASE.txt
- name: Update VERSION_LATEST_RELEASE
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update VERSION_LATEST_RELEASE to ${{ github.event.inputs.new_version }}