Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
type: boolean
default: true
required: false
outputs:
npm_version:
description: The npm package version determined during build
value: ${{ jobs.build.outputs.npm_version }}
secrets:
gradle_enterprise_access_key:
description: Value of the Gradle Enterprise access token to use.
Expand Down Expand Up @@ -42,6 +46,8 @@ jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'schedule' || github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc'
outputs:
npm_version: ${{ steps.npm-version.outputs.npm_version }}
steps:
- uses: actions/checkout@v6
with:
Expand All @@ -66,6 +72,15 @@ jobs:
- name: build
run: ./gradlew ${{ env.GRADLE_SWITCHES }} build

- name: extract npm version
id: npm-version
if: always()
run: |
VERSION_FILE="rewrite-javascript/src/main/resources/META-INF/rewrite-javascript-version.txt"
if [ -f "$VERSION_FILE" ]; then
echo "npm_version=$(cat "$VERSION_FILE")" >> "$GITHUB_OUTPUT"
fi

- name: slackNotificationOfFailure
if: (failure() || cancelled()) && github.event_name == 'schedule' && (github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/publish-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
type: string
required: false
default: 21
outputs:
npm_version:
description: The npm package version determined during build
value: ${{ jobs.release.outputs.npm_version }}
secrets:
gradle_enterprise_access_key:
description: Value of the Gradle Enterprise access token to use.
Expand Down Expand Up @@ -42,6 +46,8 @@ jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
npm_version: ${{ steps.npm-version.outputs.npm_version }}
steps:
- uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -80,3 +86,12 @@ jobs:
final \
publish \
closeAndReleaseSonatypeStagingRepository

- name: extract npm version
id: npm-version
if: always()
run: |
VERSION_FILE="rewrite-javascript/src/main/resources/META-INF/rewrite-javascript-version.txt"
if [ -f "$VERSION_FILE" ]; then
echo "npm_version=$(cat "$VERSION_FILE")" >> "$GITHUB_OUTPUT"
fi