Skip to content

Release

Release #20

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
test:
uses: ./.github/workflows/test.yml
name: Test
build-apps:
uses: ./.github/workflows/build.yml
name: Build All Apps
needs: test
with:
build-windows-installer: true
build-windows-portable: true
build-python3-zipapp: true
build-python3-wheel: true
metadata:
name: Get Metadata
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
- name: Get Project Version
id: get-version
run: |
# Get the short version output (e.g., "5.0.0.dev1")
VERSION=$(uv version --short)
echo "Version: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
release:
name: Upload Release
needs: [build-apps, metadata]
runs-on: ubuntu-latest
env:
VERSION_TAG: ${{ case(github.event_name == 'workflow_dispatch', format('v{0}', needs.metadata.outputs.version), github.ref_name) }}
permissions:
contents: write
steps:
- name: Download All Packages
uses: actions/download-artifact@v8
with:
merge-multiple: true
- name: Release Upload Assets
id: release-upload-assets
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload $VERSION_TAG \
*-portable.zip \
*-setup.exe \
*.pyzw \
*.whl \
--clobber --repo $GITHUB_REPOSITORY
- name: Create Release if not exists
if: steps.release-upload-assets.outcome == 'failure'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create $VERSION_TAG \
*-portable.zip \
*-setup.exe \
*.pyzw \
*.whl \
--repo $GITHUB_REPOSITORY \
--draft \
--title "VCF Generator Lite $VERSION_TAG" \