mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-13 04:04:09 +00:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Create Release
|
|
|
|
# This workflow creates a GitHub Release when you push a version tag
|
|
# Example tag: v1.0.0
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
# Permissions needed to create a release
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install build twine
|
|
|
|
- name: Extract version from tag
|
|
id: tag
|
|
run: |
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "Version: $VERSION"
|
|
|
|
- name: Build package
|
|
# Builds the Python package (wheel and source distribution)
|
|
run: python -m build
|
|
|
|
- name: Validate package
|
|
# Checks if the package description is valid
|
|
run: twine check dist/*
|
|
|
|
- name: Create GitHub Release
|
|
# Creates the release on GitHub and attaches the built files
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: Release ${{ steps.tag.outputs.VERSION }}
|
|
body_path: CHANGELOG.md
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: true
|
|
files: dist/*
|
|
|