diff --git a/.github/workflows/tauri.yml b/.github/workflows/tauri.yml index af80290b..24ce750d 100644 --- a/.github/workflows/tauri.yml +++ b/.github/workflows/tauri.yml @@ -33,17 +33,8 @@ jobs: run: pnpm i - name: Set environment variables run: | - if [ "$RUNNER_OS" == "Windows" ]; then - $BRANCH_NAME=$env:GITHUB_REF.Replace('refs/heads/', '') - $SHORT_SHA=$(git rev-parse --short HEAD) - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV - else - BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}') - SHORT_SHA=$(git rev-parse --short HEAD) - echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV - echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV - fi + echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV + echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}