Skip to content

Commit 2c07afa

Browse files
committed
Update README.md
1 parent 660a02b commit 2c07afa

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

prepare-release/README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,20 @@
33
This action prepares a release on GitHub:
44
1. Running `towncrier` to update the changelog.
55

6-
## GitHub Action Usage
6+
## Action Inputs
7+
8+
| Name | Description | Default |
9+
| ---- | ----------- | ------- |
10+
| `version` | Version to release. | **Required** |
11+
| `branch` | Target branch to use for the release. | `main` |
12+
| `changelog-author` | Git-format author to use for the changelog commits. | @conda-bot |
13+
| `fork-token` | GitHub token to create and push to the fork. If not provided, no fork will be used.<br>Fine-grained PAT: `administration: write` | `${{ github.token }}` |
14+
| `branch-token` | GitHub token to create and push to the branch.<br>Fine-grained PAT: `contents: write` | `${{ github.token }}` |
15+
| `pr-token` | GitHub token to create the pull request.<br>Fine-grained PAT: `pull-request: write` | `${{ github.token }}` |
16+
17+
## Sample Workflows
18+
19+
### Basic Workflow
720

821
```yaml
922
name: Prepare Release
@@ -26,17 +39,10 @@ jobs:
2639
- name: Prepare Release
2740
uses: conda/actions/prepare-release
2841
with:
29-
# [required]
30-
# the version to be released
3142
version: ${{ inputs.version }}
32-
33-
# [optional]
34-
# GitHub token to fork repository and create changelog PR
35-
# (`contents: write` & `pull-request: write` for fine-grained PAT; `repo` for classic PAT)
36-
# token: ${{ github.token }}
3743
```
3844
39-
### Sample Workflow Preparing Release using Dynamic Branch
45+
### Dynamic Branch Workflow
4046
4147
```yaml
4248
name: Prepare Release

prepare-release/action.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@ name: Prepare Release
22
description: Prepares a release by running towncrier and creating a PR with the changes.
33
inputs:
44
version:
5-
description: Release version.
5+
description: The version to release.
66
required: true
77
branch:
8-
description: Target branch for the release. Unless specified, uses the default branch.
9-
changelog_author:
10-
description: Git-format author/committer to use for pull request commits
8+
description: The target branch to use for the release.
9+
default: ${{ github.evebt.repository.default_branch }}
10+
changelog-author:
11+
description: Git-format author to use for the changelog commits.
1112
default: Conda Bot <[email protected]>
1213
fork-token:
13-
description: 'GitHub token to fork repository (`???: write`).'
14+
description: 'GitHub token to create and push to the fork. Fine-grained PAT: `administration: write`'
1415
default: ${{ github.token }}
1516
branch-token:
16-
description: 'GitHub token to checkout and create the release branch (`contents: write`).'
17+
description: 'GitHub token to create and push to the branch. Fine-grained PAT: `contents: write`'
1718
default: ${{ github.token }}
1819
pr-token:
19-
description: 'GitHub token to create the changelog PR (`pull-request: write`).'
20+
description: 'GitHub token to create the pull request. Fine-grained PAT: `pull-request: write`'
2021
default: ${{ github.token }}
2122
runs:
2223
using: composite
@@ -80,8 +81,8 @@ runs:
8081
base: ${{ inputs.branch }}
8182
delete-branch: true
8283
commit-message: Changelog ${{ inputs.version }}
83-
author: ${{ inputs.changelog_author }}
84-
committer: ${{ inputs.changelog_author }}
84+
author: ${{ inputs.changelog-author }}
85+
committer: ${{ inputs.changelog-author }}
8586
title: Changelog ${{ inputs.version }}
8687
body: |
8788
[release.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/release.yml

0 commit comments

Comments
 (0)