From a0c049dbcea53859da22ac3d9dd093962880b308 Mon Sep 17 00:00:00 2001 From: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com> Date: Tue, 31 May 2022 16:11:21 -0700 Subject: [PATCH] Updating the version check to the new Github action (#2024) * Updating the grep version check to be more strict on the new version convention * updating the way we check the version with the new github release * Fixed the release-type * switching master branch name for commit --- .github/workflows/release.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 823274ef19..8cef536426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,19 +38,11 @@ jobs: - name: Check Release Version id: version - run: | - version=$( grep -o ".*" Directory.Build.props | grep -o "[0-9]*\.[0-9]*\.[0-9]*") - previous_release_tag_version=$( - curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r ".tag_name" - ) - - if [ "v$version" == "$previous_release_tag_version" ] && \ - [ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then - echo "[!] Already released v$version. Please bump version to continue" - exit 1 - fi - - echo "::set-output name=package::$version" + uses: bitwarden/gh-actions@ea9fab01d76940267b4147cc1c4542431246b9f6 + with: + release-type: ${{ github.event.inputs.release_type }} + project-type: csharp + file: Directory.Build.props - name: Get branch name id: branch