Skip to content

Commit

Permalink
Fix build bundle tag check
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Oct 26, 2023
1 parent ee4652d commit de0c21d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/actions/build-bundle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,24 @@ runs:
- name: Export tag version
shell: bash
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }}
run: |
echo "VERSION=${TAG_VERSION}" >> $GITHUB_ENV
# GITHUB_REF is refs/tags/kani-0.1.0
echo "VERSION=$(echo ${{ github.ref }} | cut -d "-" -f 2)" >> $GITHUB_ENV
- name: Check Version
shell: bash
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }}
run: |
# Validate git tag & Cargo.toml are in sync on version number
if [[ ${{ env.CRATE_VERSION }} != ${{ env.TAG_VERSION }} ]]; then
echo "Git tag ${{env.TAG_VERSION}} did not match crate version ${{env.CRATE_VERSION}}"
if [[ ${{ env.CRATE_VERSION }} != ${{ env.VERSION }} ]]; then
echo "Git tag ${{env.VERSION}} did not match crate version ${{env.CRATE_VERSION}}"
exit 1
fi
- name: Export latest version
shell: bash
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
if: ${{ !startsWith(github.ref, 'refs/tags/kani-') }}
run: |
echo "VERSION=latest" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ jobs:
# For now, we only test for Ubuntu-18.04 so we don't bother using matrix to configure the platform.
test_alt_platform:
name: TestAlternativePlatforms
if: ${{ github.event_name == 'push' }}
needs: [build_bundle_linux]
runs-on: ubuntu-22.04
env:
Expand Down

0 comments on commit de0c21d

Please sign in to comment.