Fixes?
This commit is contained in:
@@ -250,7 +250,8 @@ pre_tag = "" # Set by `stamp preview enter`; leave blank for nor
|
||||
|----------|---------|
|
||||
| `STAMP_REPO` | Repository slug `owner/repo` — required for `publish`, `comment`, and `release-pr` |
|
||||
| `GITHUB_TOKEN` | GitHub token for releases and PR comments — automatically provided by the GitHub Actions runner; no manual setup needed |
|
||||
| `GITEA_TOKEN` | Gitea access token — **must be created manually** (Gitea Actions does not inject one automatically); create a token in your Gitea account settings and store it as a repository secret |
|
||||
| `GITEA_TOKEN` | Auto-injected by Gitea Actions — has limited scopes and **cannot create PRs or post comments**; do not use this for stamp |
|
||||
| `STAMP_GITEA_TOKEN` | PAT you create manually with `repository` (read/write) and `issue` (read/write) scopes; used by stamp for all Gitea API calls. Store it as a repository secret. The name `GITEA_TOKEN` is reserved by Gitea Actions, which is why a different name is required. |
|
||||
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — also enables Gitea mode |
|
||||
|
||||
## CI Integration
|
||||
@@ -305,9 +306,9 @@ jobs:
|
||||
- name: Comment on PR
|
||||
run: stamp comment --pr=${{ gitea.event.pull_request.number }}
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
```
|
||||
|
||||
---
|
||||
@@ -377,6 +378,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.STAMP_GITEA_TOKEN }}
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
@@ -389,9 +391,9 @@ jobs:
|
||||
- name: Create or update release PR
|
||||
run: stamp release-pr --base=main
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
```
|
||||
|
||||
**Step 2 — Publish after the release PR is merged**
|
||||
@@ -446,6 +448,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.STAMP_GITEA_TOKEN }}
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
@@ -458,9 +461,9 @@ jobs:
|
||||
- name: Publish releases
|
||||
run: stamp publish
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
STAMP_GITEA_TOKEN: ${{ secrets.STAMP_GITEA_TOKEN }}
|
||||
GITEA_BASE_URL: ${{ gitea.server_url }}
|
||||
STAMP_REPO: ${{ gitea.repository }}
|
||||
```
|
||||
|
||||
> **Tip:** Both jobs run on every push to `main`. `stamp release-pr` is a no-op once there are no more pending stamp files (i.e. after the release PR has been merged and `stamp publish` has consumed them). `stamp publish` is a no-op if there are no new tags to create. The two jobs are safe to run in parallel or in sequence.
|
||||
|
||||
Reference in New Issue
Block a user