fix CI #1271
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 | |
git checkout HEAD -- package.json | |
working-directory: rewrite-javascript-remote-server/src/main/resources/node-server | |
- 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 }} | |