Skip to content

Commit d15f4a3

Browse files
authored
Update gradle_release.yml, limit write capabilities of tools (#8056)
* Update gradle_release.yml, limit write capabilities of tools * Update gradle_snapshot.yml - limit access * Update gradle_release.yml - give env to the release job too
1 parent 00f8784 commit d15f4a3

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.github/workflows/gradle_release.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
build:
1818

1919
runs-on: ubuntu-latest
20-
permissions:
21-
contents: write
2220
env:
2321
CI_BUILD_NUMBER: ${{ github.run_number }}
2422
steps:
@@ -46,15 +44,13 @@ jobs:
4644
run: ./gradlew build --stacktrace --no-daemon
4745
- name: Upload to Codecov
4846
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
49-
# - name: Upload release
50-
# run: ./gradlew -PreleaseMode=full publish --no-daemon --no-parallel --stacktrace
51-
# env:
52-
# # Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
53-
# # ------------------------------------------------------------------------------
54-
# ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
55-
# ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
56-
# ORG_GRADLE_PROJECT_SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
57-
# ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
47+
release:
48+
runs-on: ubuntu-latest
49+
env:
50+
CI_BUILD_NUMBER: ${{ github.run_number }}
51+
permissions:
52+
contents: write
53+
steps:
5854
- name: Publish release
5955
run: ./gradlew -PreleaseMode=full publishAndReleaseToMavenCentral --no-configuration-cache --no-daemon --no-parallel --stacktrace
6056
env:

.github/workflows/gradle_snapshot.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515

1616
runs-on: ubuntu-latest
1717
if: github.repository == 'ReactiveX/RxJava'
18-
permissions:
19-
contents: write
2018
env:
2119
# ------------------------------------------------------------------------------
2220
CI_BUILD_NUMBER: ${{ github.run_number }}
@@ -41,6 +39,13 @@ jobs:
4139
run: ./gradlew test --tests "io.reactivex.rxjava4.validators.*" --stacktrace --no-daemon
4240
- name: Build RxJava
4341
run: ./gradlew build --stacktrace --no-daemon
42+
prerelease:
43+
runs-on: ubuntu-latest
44+
permissions:
45+
contents: write
46+
env:
47+
CI_BUILD_NUMBER: ${{ github.run_number }}
48+
steps:
4449
- name: Upload Snapshot
4550
run: ./gradlew -PreleaseMode=branch publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel --stacktrace
4651
env:

0 commit comments

Comments
 (0)