style: format YAML files for consistency and remove unused environment variables

This commit is contained in:
bohd4nx
2026-05-29 01:43:05 +03:00
parent c1ff78c484
commit 34ee31e299
2 changed files with 12 additions and 34 deletions
+6 -8
View File
@@ -2,16 +2,14 @@ name: CI
on:
push:
branches: [ "**" ]
branches: ["**"]
pull_request:
branches: [ "**" ]
branches: ["**"]
jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v6
@@ -19,21 +17,20 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: "3.10"
cache: pip
- run: pip install ".[dev]"
- run: ruff check . && ruff format --check . && mypy pyfragment
- run: ruff check . && ruff format --check . && mypy pyfragment --explicit-package-bases
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ] # 3.13, 3.14 are not supported by some dependencies yet
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
@@ -41,6 +38,7 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package and dev dependencies
run: pip install ".[dev]"
+6 -26
View File
@@ -2,17 +2,15 @@ name: Publish
on:
workflow_run:
workflows: [ "CI" ]
types: [ completed ]
branches: [ master ]
workflows: ["CI"]
types: [completed]
branches: [master]
jobs:
version-check:
name: Version Check
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
outputs:
version: ${{ steps.version.outputs.value }}
is-new: ${{ steps.tag.outputs.is-new }}
@@ -42,8 +40,6 @@ jobs:
needs: version-check
if: needs.version-check.outputs.is-new == 'true'
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v6
@@ -63,10 +59,8 @@ jobs:
publish:
name: Publish to PyPI
needs: [ version-check, build ]
needs: [version-check, build]
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
environment:
name: pypi
url: https://pypi.org/project/pyfragment/
@@ -83,35 +77,21 @@ jobs:
release:
name: GitHub Release
needs: [ version-check, build ]
needs: [version-check, build]
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/download-artifact@v8
with:
name: dist
path: dist
- name: Extract latest changelog entry
id: changelog
run: |
body=$(awk '/^## \[/{if(found) exit; found=1; next} found{print}' CHANGELOG.md)
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$body" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- uses: softprops/action-gh-release@v3
with:
tag_name: v${{ needs.version-check.outputs.version }}
name: v${{ needs.version-check.outputs.version }}
files: dist/*
body: ${{ steps.changelog.outputs.body }}
generate_release_notes: true
make_latest: true