Skip to content

Commit

Permalink
Update version.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kremser authored Oct 20, 2021
1 parent fde417b commit 2139216
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Read version numbers
run: |
echo ::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\//}
echo ::set-env name=SOURCE_VERSION::$(grep -E "SIMPLECLI_VERSION \"[0-9]?.[0-9]?.[0-9]?\"$" src/SimpleCLI.h | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")
echo ::set-env name=JSON_VERSION::$(grep -E "\"version\": \"[0-9]?.[0-9]?.[0-9]?\",$" library.json | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")
echo ::set-env name=PROPERTIES_VERSION::$(grep -E "version=[0-9]?.[0-9]?.[0-9]?$" library.properties | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")
- name: Print versions
run: |
echo "Release tag: ${{ env.RELEASE_VERSION }}"
echo "src/SimpleCLI.h: ${{ env.SOURCE_VERSION }}"
echo "library.json: ${{ env.JSON_VERSION }}"
echo "library.properties: ${{ env.PROPERTIES_VERSION }}"
echo "Release tag: $GITHUB_REF/refs\/tags\//}"
echo "src/SimpleCLI.h: $(grep -E "SIMPLECLI_VERSION \"[0-9]?.[0-9]?.[0-9]?\"$" src/SimpleCLI.h | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")"
echo "library.json: $(grep -E "\"version\": \"[0-9]?.[0-9]?.[0-9]?\",$" library.json | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")"
echo "library.properties: $(grep -E "version=[0-9]?.[0-9]?.[0-9]?$" library.properties | grep -oE "[0-9]?\.[0-9]?\.[0-9]?")"
# - name: Delete latest Release
# if: env.RELEASE_VERSION != env.SOURCE_VERSION || env.RELEASE_VERSION != env.JSON_VERSION || env.RELEASE_VERSION != env.PROPERTIES_VERSION
Expand Down

0 comments on commit 2139216

Please sign in to comment.