Use sed to get package version (#75)

The sed tool is more fitting than grep in this case.
This commit is contained in:
Ivan Tham 2020-10-30 18:09:07 +08:00 committed by GitHub
parent 8fabbfef8c
commit 832e8d27aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ jobs:
echo ::set-output name=jar_file::\ echo ::set-output name=jar_file::\
$(echo ./desktop/build/libs/*.jar) $(echo ./desktop/build/libs/*.jar)
echo ::set-output name=version::\ echo ::set-output name=version::\
$(echo ./desktop/build/libs/*.jar | grep -Po -- '(?<=-)(.+?)(?=\.jar)') $(echo ./desktop/build/libs/*.jar | sed 's/.*-\([0-9.]\+\)\.jar/\1/')
- name: Create release - name: Create release
id: create_release id: create_release