Skip to content

Commit c8dd6ae

Browse files
committed
Update README.md
1 parent a8533c7 commit c8dd6ae

File tree

2 files changed

+21
-36
lines changed

2 files changed

+21
-36
lines changed

create-release/README.md

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ This action creates a release on GitHub:
55
2. Computing the checksum for the archived tarball.
66
3. Extracting the release notes from the changelog.
77

8-
## GitHub Action Usage
8+
## Action Inputs
99

10-
Requirements:
11-
- `contents: write` permission to the repository
12-
- (optional) Python >=3.7
10+
| Name | Description | Default |
11+
| ---- | ----------- | ------- |
12+
| `version` | Version to release. | **Required** |
13+
| `branch` | Target branch to use for the release. | `${{ github.even.repository.default_branch` |
14+
| `archive-name` | Name of the git archive to create. | `${{ github.event.repository.name }}-${{ inputs.version }}` |
15+
| `output-directory` | Directory for the release artifacts. | `release` |
16+
| `release-notes` | Name of the release notes to create. | `RELEASE_NOTES.md` |
17+
| `token` | GitHub token to create the release.<br>Fine-grained PAT: `contents: write` | `${{ github.token }}` |
18+
19+
## Sample Workflows
20+
21+
### Basic Workflow
1322

1423
```yaml
1524
name: Create Release
@@ -18,7 +27,7 @@ on:
1827
workflow_dispatch:
1928
inputs:
2029
version:
21-
description: Release version
30+
description: The version to release.
2231
required: true
2332

2433
permissions:
@@ -31,33 +40,11 @@ jobs:
3140
- name: Create Release
3241
uses: conda/actions/create-release
3342
with:
34-
# [required]
35-
# the version to be released
3643
version: ${{ inputs.version }}
37-
38-
# [required]
39-
# the target branch for the release
4044
branch: main
41-
42-
# [optional]
43-
# name of the tarball archive
44-
# archive-name: ${{ github.event.repository.name }}-${{ github.ref_name }}
45-
46-
# [optional]
47-
# directory for the release artifacts
48-
# output-directory: release
49-
50-
# [optional]
51-
# path to the release notes
52-
# release-notes: RELEASE_NOTES.md
53-
54-
# [optional]
55-
# GitHub token to author release
56-
# (`contents: write` for fine-grained PAT; `repo` for classic PAT)
57-
# token: ${{ github.token }}
5845
```
5946
60-
### Sample Workflow Creating Release using Dynamic Branch
47+
### Dynamic Branch Workflow
6148
6249
```yaml
6350
name: Create Release
@@ -66,7 +53,7 @@ on:
6653
workflow_dispatch:
6754
inputs:
6855
version:
69-
description: Release version
56+
description: The version to release.
7057
required: true
7158

7259
permissions:

create-release/action.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@ name: Create Release
22
description: Creates a release by archiving the source and creating a release on GitHub.
33
inputs:
44
version:
5-
description: Release version.
5+
description: Version to release.
66
required: true
77
branch:
88
description: Target branch for the release.
9-
required: true
9+
default: ${{ github.event.repository.default_branch }}
1010
archive-name:
11-
description: Name of the tarball archive.
12-
default: ${{ github.event.repository.name }}-${{ github.ref_name }}
11+
description: Name of the git archive.
12+
default: ${{ github.event.repository.name }}-${{ inputs.version }}
1313
output-directory:
1414
description: Directory for the release artifacts.
1515
default: release
1616
release-notes:
1717
description: Path to the release notes.
1818
default: RELEASE_NOTES.md
1919
token:
20-
description: >-
21-
GitHub token to author release
22-
(`contents: write` for fine-grained PAT; `repo` for classic PAT).
20+
description: 'GitHub token to create the release. Fine-grained PAT: `contents: write`'
2321
default: ${{ github.token }}
2422
runs:
2523
using: composite

0 commit comments

Comments
 (0)