Skip to content

Commit

Permalink
Fix warning & update to new output format
Browse files Browse the repository at this point in the history
  • Loading branch information
Conchylicultor authored Nov 22, 2022
1 parent b68e603 commit 8f4fe8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
update-semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: haya14busa/action-update-semver@v1
with:
major_version_tag_only: true # (optional, default is "false")
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Setup Python
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand Down
4 changes: 3 additions & 1 deletion src/compare_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def get_pypi_versions(pkg_name: str) -> list[str]:
def set_output(name: str, value: _Value) -> None:
"""Set github action output."""
value = _normalize_value(value)
print(f"::set-output name={name}::{value}")

with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
print(f'{name}={value}', file=f)


def _normalize_value(value: _Value) -> str:
Expand Down

0 comments on commit 8f4fe8e

Please sign in to comment.