Skip to content

Commit

Permalink
Try to add separated block via text file
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTimchenkoLightspeed committed Jan 14, 2025
1 parent 9097f6c commit 4a80f17
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
cache: 'gradle'

- name: Build, run tests and upload dev snapshot to Maven Central with Gradle
run: ./gradlew devSnapshot printDevSnapshotReleaseNote && ./gradlew devSanitizedVersion printSanitizedVersion >> $GITHUB_STEP_SUMMARY
run: |
./gradlew devSnapshot printDevSnapshotReleaseNote devSanitizedVersion printSanitizedVersion
env:
STORE_ID: ${{ secrets.STORE_ID }}
API_TOKEN: ${{ secrets.API_TOKEN }}
Expand All @@ -36,6 +37,14 @@ jobs:
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.ref }}

- name: Read sanitized version
id: read_sanitized_version
run: echo "sanitized_version=$(cat sanitized_version.txt)" >> $GITHUB_ENV

- name: Output sanitized version
run: |
echo "Sanitized Version: ${{ env.sanitized_version }}" >> $GITHUB_STEP_SUMMARY
- name: Upload artifacts with checks results
uses: actions/upload-artifact@v3
if: failure()
Expand Down
4 changes: 3 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ fun printDevSnapshotReleaseNote(groupId: String, artifactId: String, sanitizedVe
}

fun printSanitizedVersion(sanitizedVersion: String): String {
return "Sanitized version: $sanitizedVersion"
val output = "Sanitized version: $sanitizedVersion"
File("sanitized_version.txt").writeText(output)
return output
}

class SettingsProvider {
Expand Down

0 comments on commit 4a80f17

Please sign in to comment.