diff --git a/.cspell.json b/.cspell.json index f87253e7..f5d4e126 100644 --- a/.cspell.json +++ b/.cspell.json @@ -3,18 +3,24 @@ "acked", "bidi", "commitizen", + "ehdmg", "eifinger", "httpx", "levelno", "liblaf", + "oqmr", "pycache", "pydantic", + "pypa", + "pypi", "pyproject", "pyright", "taplo", "tiktoken", "typer", - "venv" + "useh", + "venv", + "ztrp" ], "ignorePaths": ["**/*-lock.*", "**/*.lock*", "**/.cspell.json"], "allowCompoundWords": true diff --git a/.github/release-please/.manifest.json b/.github/release-please/.manifest.json new file mode 100644 index 00000000..00a51956 --- /dev/null +++ b/.github/release-please/.manifest.json @@ -0,0 +1 @@ +{ ".": "0.7.0" } diff --git a/.github/release-please/config.json b/.github/release-please/config.json new file mode 100644 index 00000000..2820d174 --- /dev/null +++ b/.github/release-please/config.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "changelog-sections": [ + { "type": "feat", "section": "✨ Features" }, + { "type": "fix", "section": "🐛 Bug Fixes" }, + { "type": "perf", "section": "🚀 Performance Improvements" }, + { "type": "revert", "section": "🔙 Reverts" }, + { "type": "docs", "section": "📚 Documentation" }, + { "type": "style", "section": "🎨 Styles" }, + { "type": "chore", "section": "🏗 Miscellaneous Chores" }, + { "type": "refactor", "section": "♻️ Code Refactoring" }, + { "type": "test", "section": "🚦 Tests" }, + { "type": "build", "section": "📦 Build System" }, + { "type": "ci", "section": "💻 Continuous Integration" } + ], + "packages": { + ".": { + "release-type": "python", + "include-component-in-tag": false + } + } +} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e53edac6..ee049f05 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,8 +4,28 @@ on: push: jobs: + release-please: + name: Release Please + permissions: + contents: write + pull-requests: write + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + outputs: + created: ${{ steps.release.outputs.releases_created }} + tag: ${{ steps.release.outputs.tag_name }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - id: release + name: Release Please + uses: google-github-actions/release-please-action@v4 + with: + config-file: .github/release-please/config.json + manifest-file: .github/release-please/.manifest.json + build: - name: Build Package + name: Build runs-on: ubuntu-latest steps: - name: Checkout @@ -15,14 +35,12 @@ jobs: - name: Install Dependencies run: rye sync - name: Build Package - run: |- - source .venv/bin/activate - make dist + run: rye build - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: pkg - path: dist/* + name: dist + path: dist pre-release: name: Pre-release @@ -41,8 +59,8 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v4 with: + name: dist path: dist - merge-multiple: true - name: Create GitHub Release uses: liblaf/repo/.github/actions/release@main with: @@ -50,3 +68,44 @@ jobs: files: dist/* pre-release: true recreate: true + + publish: + name: Publish + permissions: + id-token: write + needs: + - release-please + - build + if: needs.release-please.outputs.created == 'true' + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + release: + name: Release + permissions: + contents: write + needs: + - release-please + - build + if: needs.release-please.outputs.created == 'true' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist + - name: Create GitHub Release + uses: liblaf/repo/.github/actions/release@main + with: + tag: ${{ needs.release-please.outputs.tag }} + files: dist/*