simple-icons/.github/workflows/get-version.yml
Álvaro Mondéjar ee372033ab
Deduplicate get-labels and get-version steps in GHA workflows (#9789)
* Deduplicate steps in GHA workflows

* Minor change
2023-10-28 20:31:47 +01:00

23 lines
568 B
YAML

# Get the current version
name: Get version
on:
workflow_call:
outputs:
version:
description: The version of the project
value: ${{ jobs.get-version.outputs.version }}
jobs:
get-version:
name: Get version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Get version from package.json
id: get-version
run: |
version="$(grep version -m 1 -i package.json | sed 's/[ \",:version]//g')"
echo "version=$version" >> $GITHUB_OUTPUT