forked from SimpleFinance/gradle-test-lab-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Generate changelog
id: changelog
uses: heinrichreimer/[email protected]
with:
onlyLastTag: "true"
stripHeaders: "true"
stripGeneratorNotice: "true"
- name: Upload changelog
uses: actions/upload-artifact@v2
with:
name: changelog
path: CHANGELOG.md
- name: Create release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.changelog.outputs.changelog }}
prerelease: false
plugin:
name: Publish plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Log in to Gradle plugin portal
run: |
mkdir -p ~/.gradle
touch ~/.gradle/gradle.properties
echo gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} >> ~/.gradle/gradle.properties
echo gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} >> ~/.gradle/gradle.properties
- name: Publish release artifacts
run: >-
./gradlew
-Psnapshot=false
-PgithubUser=${{ github.actor }}
-PgithubPass=${{ secrets.GITHUB_TOKEN }}
-Dgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}
-Dgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
publishAllPublicationsToGithubRepository publishPlugins