chore: remove obsolete GitHub workflows and update documentation commands
Some checks failed
Test / test (push) Failing after 11m14s
Some checks failed
Test / test (push) Failing after 11m14s
This commit is contained in:
70
.github/workflows/release.yml
vendored
Normal file
70
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
# Publish on any tag starting with a `v`, e.g., v1.0.1
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
check_version:
|
||||
name: Check Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.read_version.outputs.version }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Check tag matches project version
|
||||
id: read_version
|
||||
run: |
|
||||
version="$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")"
|
||||
if [ "v$version" != "$GITHUB_REF_NAME" ]; then
|
||||
echo "Tag $GITHUB_REF_NAME does not match pyproject.toml version $version" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build_extensions:
|
||||
name: Build Extensions
|
||||
needs: check_version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Run tests
|
||||
run: uv run pytest
|
||||
|
||||
- name: Pack extensions
|
||||
run: uv run pack
|
||||
|
||||
- name: Check extension archives
|
||||
run: |
|
||||
for platform in windows-x64 macos-arm64 linux-x64; do
|
||||
archive="dist/AnyImage.v${{ needs.check_version.outputs.version }}.${platform}.zip"
|
||||
if [ ! -f "$archive" ]; then
|
||||
echo "Missing archive: $archive" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Publish release
|
||||
uses: https://gitea.com/actions/gitea-release-action@v1.3.6
|
||||
with:
|
||||
files: |-
|
||||
dist/*.zip
|
||||
Reference in New Issue
Block a user