Skip to content

Release

Release #6

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
release:
name: Release
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: "3.11"
version: 'latest'
- name: Get Version
id: version
run: |
echo "VERSION=$(uv version --short)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Check Version
if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
run: exit 1
- name: Generate Changelog
uses: orhun/git-cliff-action@v4
id: changelog
with:
config: cliff.toml
args: --latest --strip header
env:
GITHUB_REPO: ${{ github.repository }}
- name: Build with PyInstaller
shell: pwsh
run: |
uv sync
uv run pyinstaller peekapi.spec --noconfirm
- name: Create ZIP archive
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
filename: 'PeekAPI-${{ steps.version.outputs.TAG_NAME }}-windows.zip'
directory: 'dist'
path: 'peekapi'
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: PeekAPI ${{ steps.version.outputs.TAG_NAME }}
body: ${{ steps.changelog.outputs.content }}
files: dist/PeekAPI-${{ steps.version.outputs.TAG_NAME }}-windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}