Skip to content

Commit 31edcfa

Browse files
authored
Remove overly broad permissions from release.yml (#7577)
1 parent eac4572 commit 31edcfa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ env:
1616
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR: C:\Program Files\OpenSSL\lib\VC\x64\MD
1717
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR: C:\Program Files\OpenSSL\include
1818

19+
permissions: {}
20+
1921
jobs:
2022
build:
2123
runs-on: ${{ matrix.os }}
2224
# Disable this scheduled job when running on a fork.
2325
if: ${{ github.repository == 'RustPython/RustPython' || github.event_name != 'schedule' }}
26+
permissions:
27+
contents: read
2428
strategy:
2529
matrix:
2630
include:
@@ -84,6 +88,8 @@ jobs:
8488
runs-on: ubuntu-latest
8589
# Disable this scheduled job when running on a fork.
8690
if: ${{ github.repository == 'RustPython/RustPython' || github.event_name != 'schedule' }}
91+
permissions:
92+
contents: read
8793
steps:
8894
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8995
with:
@@ -147,6 +153,8 @@ jobs:
147153
# Disable this scheduled job when running on a fork.
148154
if: ${{ github.repository == 'RustPython/RustPython' || github.event_name != 'schedule' }}
149155
needs: [build, build-wasm]
156+
permissions:
157+
contents: write # for creating a release
150158
steps:
151159
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
152160
with:
@@ -187,7 +195,7 @@ jobs:
187195
$PRERELEASE_ARG \
188196
bin/rustpython-release-*
189197
env:
190-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198+
GH_TOKEN: ${{ github.token }}
191199
tag: ${{ github.ref_name }}
192200
run: ${{ github.run_number }}
193201
PRE_RELEASE_INPUT: ${{ github.event.inputs.pre-release }}

0 commit comments

Comments
 (0)