From 785ba27c85920d90b4453645279376fbbe330888 Mon Sep 17 00:00:00 2001 From: Alex Lovell-Troy Date: Fri, 22 Nov 2024 16:22:33 -0500 Subject: [PATCH] fix: Update branch extraction method in hydrun CI workflow --- .github/workflows/hydrun.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hydrun.yaml b/.github/workflows/hydrun.yaml index ede1505..aa9953b 100644 --- a/.github/workflows/hydrun.yaml +++ b/.github/workflows/hydrun.yaml @@ -80,16 +80,19 @@ jobs: with: path: /tmp/out - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT id: extract_branch - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + - name: Publish pre-release to GitHub releases - if: ${{ github.ref == 'refs/heads/main' }} + if: startsWith(github.ref, 'refs/heads/main') uses: softprops/action-gh-release@v2 with: tag_name: release-${{ steps.extract_branch.outputs.branch }} prerelease: true files: | /tmp/out/*/* + - name: Publish release to GitHub releases if: startsWith(github.ref, 'refs/tags/v') uses: softprops/action-gh-release@v2