diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52c58e3..bd98c8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,25 @@ on: workflow_dispatch: jobs: + preflight: + runs-on: ubuntu-latest + outputs: + is_pre_release: ${{ steps.get_version.outputs.is_pre_release }} + version: ${{ steps.get_version.outputs.version }} + steps: + - id: get_version + run: | + VERSION="${GITHUB_REF#refs/*/}" + + if [[ "$VERSION" =~ ^v\d+\.\d+\.\d+$ ]]; then + IS_PRE_RELEASE="false" + else + IS_PRE_RELEASE="true" + fi + + echo "is_pre_release=${IS_PRE_RELEASE}" >> "$GITHUB_OUTPUT" + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + build: uses: ./.github/workflows/build.yml