Skip to content

Commit

Permalink
replace set-output with modern syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh committed Aug 22, 2024
1 parent 7fce8bb commit 1aff593
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
id: galaxy_yml_version
run: |
import yaml
import os
with open('galaxy.yml', 'r') as file:
data = yaml.safe_load(file)
print(f"version={data['version']}")
print(f"::set-output name=value::{data['version']}")
with open(os.environ['GITHUB_OUTPUT'], 'a') as output_file:
output_file.write(f"{value}={data['version']}\n")
shell: "python"

- name: "Compare with latest git tag"
Expand All @@ -40,9 +41,9 @@ jobs:
latest_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')
if [[ "${{ steps.galaxy_yml_version.outputs.value }}" != "$latest_tag" ]]; then
echo "::set-output name=value::true"
echo "{value}={true}" >> $GITHUB_OUTPUT
else
echo "::set-output name=value::false"
echo "{value}={false}" >> $GITHUB_OUTPUT
fi
publish:
Expand Down

0 comments on commit 1aff593

Please sign in to comment.