Skip to content

WIP

WIP #2

Workflow file for this run

---
name: Release
on:
push:
tags:
- "**"
permissions:
contents: write
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}"
echo "is_pre_release=${IS_PRE_RELEASE}" >> "$GITHUB_OUTPUT"
echo "version=${VERSION}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
build:
uses: ./.github/workflows/build.yml
needs: preflight
release:
runs-on: ubuntu-latest
needs:
- preflight
- build
steps:
- uses: actions/checkout@v4
- run: |
echo "version=${{ needs.preflight.outputs.version }}"
echo "is_pre_release=${{ needs.preflight.outputs.is_pre_release }}"
# - id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# # tag_name: ${{ github.ref }}
# release_name: ${{ needs.preflight.outputs.version }}
# # draft: true
# prerelease: ${{ needs.build.outputs.is_pre_release }}