Skip to content

Commit

Permalink
GA: version verification
Browse files Browse the repository at this point in the history
  • Loading branch information
petrgazarov committed Oct 18, 2023
1 parent 910fb25 commit 7a2eab9
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/create_gh_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,23 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download binary artifacts
uses: actions/download-artifact@v3

- name: Get Salami version
id: salami-version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Download binary artifacts
uses: actions/download-artifact@v3
with:
name: salami-${{ steps.salami-version.outputs.version }}-linux-arm64

- name: Verify version
run: |
version_from_binary=$(./salami-${{ steps.salami-version.outputs.version }}-linux-arm64/salami-${{ steps.salami-version.outputs.version }}-linux-arm64 version)
if [ "$version_from_binary" != "${{ steps.salami-version.outputs.version }}" ]; then
echo "Version mismatch: $version_from_binary != ${{ steps.salami-version.outputs.version }}"
version_from_tag=${{ steps.salami-version.outputs.version }}
chmod +x ./salami-$version_from_tag-linux-arm64/salami-$version_from_tag-linux-arm64
version_from_binary=$(./salami-$version_from_tag-linux-arm64/salami-$version_from_tag-linux-arm64 version)
if [ "$version_from_binary" != "$version_from_tag" ]; then
echo "Version mismatch: $version_from_binary != $version_from_tag"
exit 1
fi
Expand Down

0 comments on commit 7a2eab9

Please sign in to comment.