forked from java-diff-utils/java-diff-utils
-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (72 loc) · 2.42 KB
/
pull_request.yml
File metadata and controls
88 lines (72 loc) · 2.42 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request
on: pull_request
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- name: Short SHA
env:
COMMIT_SHA: ${{github.event.pull_request.head.sha}}
run: echo "short_sha=${COMMIT_SHA::7}" >> $GITHUB_ENV
- name: Read version
id: read_version
uses: reedyuk/read-properties@v1.0.1
with:
path: 'gradle.properties'
property: 'version'
- name: Update version
uses: reedyuk/write-properties@v1.0.1
with:
path: 'gradle.properties'
property: 'version'
value: "${{ steps.read_version.outputs.value }}-${{ github.head_ref }}-${{ env.short_sha }}"
- name: Change package version
uses: eskatos/gradle-command-action@v1
with:
arguments: updateVersion
- name: Build
uses: eskatos/gradle-command-action@v1
with:
arguments: build
- name: Test
uses: eskatos/gradle-command-action@v1
with:
arguments: jvmTest
- name: Test Report
uses: scacap/action-surefire-report@v1
if: always()
with:
report_paths: "build/test-results/jvmTest/*.xml"
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
uses: eskatos/gradle-command-action@v1
with:
arguments: publishAllPublicationsToGitHubPackagesRepository
env:
TOKEN: ${{ secrets.AUTO_TOKEN }}
USERNAME: ${{ secrets.AUTO_USERNAME }}
- name: Setup NPM
run: npm config set //npm.pkg.github.com/:_authToken=$token
env:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup package name
uses: eskatos/gradle-command-action@v1
with:
arguments: prepareForGithubNpmPublish
- name: Publish to npm
uses: eskatos/gradle-command-action@v1
with:
arguments: publishToNpm
- name: Setup package name for legacy
uses: eskatos/gradle-command-action@v1
with:
arguments: prepareForGithubNpmPublishLegacy
- name: Publish legacy to npm
uses: eskatos/gradle-command-action@v1
with:
arguments: publishToNpm