-
Notifications
You must be signed in to change notification settings - Fork 6
73 lines (63 loc) · 1.95 KB
/
ci.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
62
63
64
65
66
67
68
69
70
71
72
---
name: ci
on:
push:
branches:
- main
tags-ignore:
- "*"
pull_request:
branches:
- main
workflow_dispatch: {}
schedule:
- cron: 0 18 * * *
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
GRADLE_SWITCHES: --console=plain --info --stacktrace --warning-mode=all --no-daemon
RELEASE_BUILD: "true"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: gradle
- uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: true
- name: build
run: (./gradlew ${{ env.GRADLE_SWITCHES }} build)
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: openrewrite/package-lock.json
- run: npm ci
working-directory: openrewrite
- run: npm run build
working-directory: openrewrite
- run: npm run test
working-directory: openrewrite
- run: npm pack
working-directory: openrewrite
- name: npm install embedded
run: |
npm install @openrewrite/rewrite-remote
npm install ../../../../openrewrite/openrewrite-rewrite-*.tgz
working-directory: rewrite-javascript-remote-server/src/main/resources
- name: publish-java-snapshots
if: github.event_name != 'pull_request'
run: ./gradlew ${{ env.GRADLE_SWITCHES }} assemble snapshot publish -PforceSigning -x test
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_SIGNING_PASSWORD }}