fix(ci): improve version extraction (#1336)

* fix(ci): right use of grep

* fix(ci): remove unnecessary `head` command
This commit is contained in:
Andrea Giovine 2022-08-15 10:24:42 +02:00 committed by GitHub
parent d795d81fbf
commit ce01989f7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ jobs:
- name: "Extract version"
id: "version"
run: |
ESPANSO_VERSION=$(cat espanso/Cargo.toml | grep version | head -1 | awk -F '"' '{ print $2 }')
ESPANSO_VERSION=$(grep '^version' espanso/Cargo.toml | awk -F '"' '{ print $2 }')
echo version: $ESPANSO_VERSION
echo "::set-output name=version::v$ESPANSO_VERSION"