Skip to content

Merge pull request #8 from viru185/release-please--branches--main #17

Merge pull request #8 from viru185/release-please--branches--main

Merge pull request #8 from viru185/release-please--branches--main #17

Workflow file for this run

name: release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- id: release
uses: googleapis/release-please-action@v4
with:
release-type: python
build-and-attach:
needs: release
if: ${{ needs.release.outputs.release_created == 'true' }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
run: pip install uv
- name: Sync dependencies
run: uv sync --all-extras --all-groups
- name: Build installers
run: uv run python build.py
- name: Prepare release table
shell: bash
env:
TAG_NAME: ${{ needs.release.outputs.tag_name }}
run: |
set -euo pipefail
shopt -s nullglob
files=(dist/*.exe)
if [ ${#files[@]} -eq 0 ]; then
echo "No executables found in dist/" >&2
exit 1
fi
mkdir -p build
output="build/release-table.md"
{
echo "## Downloadable Installers"
echo
echo "| Client | Download |"
echo "| --- | --- |"
for path in "${files[@]}"; do
file_name="$(basename "$path")"
client="${file_name#autoUFL_}"
client="${client%.exe}"
url="https://github.com/${GITHUB_REPOSITORY}/releases/download/${TAG_NAME}/${file_name}"
echo "| ${client} | [${file_name}](${url}) |"
done
} > "${output}"
- name: Upload installers to release
uses: softprops/action-gh-release@v1
with:
files: dist/*.exe
tag_name: ${{ needs.release.outputs.tag_name }}
append_body: true
body_path: build/release-table.md