mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-13 04:04:09 +00:00
- Add explicit permissions to all workflows (format, release, ci, test, label-issues, mark-answered) - Fix format.yml to have write permissions for PR creation - Add security.yml workflow for automated vulnerability scanning - Improve security posture with minimal permissions principle
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
name: Create Release
|
|
|
|
# Creates a GitHub release when a version tag is pushed
|
|
# Tag format: v1.2.3
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
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
|
|
run: python -m build
|
|
|
|
- name: Validate package
|
|
run: twine check dist/*
|
|
|
|
- name: Create GitHub Release
|
|
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/*
|
|
|