diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc8768f..4cf4f1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,15 @@ jobs: - name: Prepare run: git init working-directory: testdata - - name: Run gcov2lcov-action + - name: Run gcov2lcov-action with specific release + uses: ./ + with: + working-directory: testdata + version: v1.0.4 + - name: Diff + run: diff -y coverage_expected.lcov coverage.lcov + working-directory: testdata + - name: Run gcov2lcov-action with latest release uses: ./ with: working-directory: testdata diff --git a/CHANGELOG.md b/CHANGELOG.md index 6900aaa..3f9f3a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog for gcov2lcov-action +## 1.0.8 [2020-11-05] + +- fix: use correct download link when specific version of gcov2lcov is set (#11) + ## 1.0.5 [2020-10-15] - without docker runtime diff --git a/action.yml b/action.yml index 800fcf9..ff6b5f2 100644 --- a/action.yml +++ b/action.yml @@ -23,11 +23,12 @@ runs: using: composite steps: - shell: bash - run: 'set -x && curl -sLf "${RELEASE}/${NAME}.tar.gz" | tar zxf - --strip 1' + run: 'set -x && curl -sLf "$([ ${{inputs.version}} == latest ] && echo $LATEST_RELEASE || echo $RELEASE)/${NAME}.tar.gz" | tar zxf - --strip 1' working-directory: /tmp env: NAME: "gcov2lcov-linux-amd64" - RELEASE: "https://github.com/jandelgado/gcov2lcov/releases/${{inputs.version}}/download" + RELEASE: "https://github.com/jandelgado/gcov2lcov/releases/download/${{inputs.version}}" + LATEST_RELEASE: "https://github.com/jandelgado/gcov2lcov/releases/latest/download" - shell: bash run: set -x && /tmp/gcov2lcov-linux-amd64 -infile "${{ inputs.infile }}" -outfile "${{ inputs.outfile }}" working-directory: ${{ inputs.working-directory }}