Skip to content

Commit 440651d

Browse files
authored
Replace PAT with default GITHUB_TOKEN (#386)
* Replace PAT with default GITHUB_TOKEN A PAT isn't needed for either of these Actions. * Only expose env vars to step that needs them
1 parent da86533 commit 440651d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/workflows/generate-references.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ jobs:
77
docs-generation:
88
name: Generate references
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
1012
steps:
1113
- name: Checkout the repository
1214
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
1315
with:
1416
fetch-depth: 0
15-
token: ${{ secrets.POSTHOG_BOT_PAT }}
1617

1718
- name: Set up Python
1819
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ jobs:
1212
release:
1313
name: Publish release
1414
runs-on: ubuntu-latest
15-
env:
16-
TWINE_USERNAME: __token__
17-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
15+
permissions:
16+
contents: write
1817
steps:
1918
- name: Checkout the repository
2019
uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2
2120
with:
2221
fetch-depth: 0
23-
token: ${{ secrets.POSTHOG_BOT_PAT }}
2422

2523
- name: Set up Python
2624
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
@@ -40,12 +38,13 @@ jobs:
4038
run: uv sync --extra dev
4139

4240
- name: Push releases to PyPI
41+
env:
42+
TWINE_USERNAME: __token__
43+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
4344
run: uv run make release && uv run make release_analytics
4445

4546
- name: Create GitHub release
4647
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.POSTHOG_BOT_PAT }}
4948
with:
5049
tag_name: v${{ env.REPO_VERSION }}
5150
release_name: ${{ env.REPO_VERSION }}

0 commit comments

Comments
 (0)