Skip to content

Commit 1eeda76

Browse files
feat: accept tag input
1 parent 9bcd4e4 commit 1eeda76

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,22 @@ jobs:
3535
fetch-depth: 0
3636

3737
- name: Python Semantic Release
38+
id: release
3839
uses: python-semantic-release/[email protected]
3940
with:
4041
github_token: ${{ secrets.GITHUB_TOKEN }}
4142
# <other options here>
4243

4344
- name: Publish package to PyPI
4445
uses: pypa/gh-action-pypi-publish@release/v1
46+
if: ${{ steps.release.outputs.released }} == 'true'
4547

4648
- name: Publish package to GitHub Release
4749
uses: python-semantic-release/upload-to-gh-release@main
50+
if: ${{ steps.release.outputs.released }} == 'true'
4851
with:
4952
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
tag: ${{ steps.release.outputs.tag }}
5054
```
5155
5256
## Options

action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: "Python Semantic Release - Publish"
33

4-
description: "Publish Python Wheels and other Artefacts to GitHub Releases"
4+
description: "Publish Python Wheels and Other Artefacts to GitHub Releases"
55

66
inputs:
77
root_options:
@@ -23,6 +23,14 @@ inputs:
2323
edit releases.
2424
required: true
2525

26+
tag:
27+
description: |
28+
The tag corresponding to the GitHub Release that the artefacts should
29+
be published to. Defaults to 'latest', in which case the latest tag
30+
will be identified by Python Semantic Release and used to publish to.
31+
required: false
32+
default: "latest"
33+
2634
runs:
2735
using: "docker"
2836
image: "Dockerfile"

0 commit comments

Comments
 (0)