Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/dependabot.yaml

This file was deleted.

12,494 changes: 0 additions & 12,494 deletions .github/semantic_release/package-lock.json

This file was deleted.

9 changes: 0 additions & 9 deletions .github/semantic_release/package.json

This file was deleted.

82 changes: 30 additions & 52 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,50 @@
name: Release
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json

name: release
on:
push:
branches:
- main
branches: [main, next, beta, alpha, "*.x"]

jobs:
release:
name: github-release
name: release
if: github.repository_owner == 'juftin'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: setup-uv
uses: astral-sh/setup-uv@6b9c6063abd6010835644d4c2e1bef4cf5cd0fca # v6.0.1
- name: Semantic Release
uses: juftin/actions/semantic-release@v1
with:
fetch-depth: 2
ref: main
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Release
run: |
npm install --prefix .github/semantic_release/
npx --prefix .github/semantic_release/ semantic-release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
github_token: ${{ secrets.GITHUB_TOKEN }}

github-pages-publish:
docs:
name: docs
runs-on: ubuntu-latest
needs: release
if: github.repository_owner == 'juftin'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout Latest Changes
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up Python Environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Create Virtual Environment
run: hatch env create docs
- name: Set Up GitHub Actions User
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Build Site
run: hatch run docs:build
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
- name: build-docs
uses: juftin/actions/taskfile@v1
with:
path: site/
- name: Deploy to GitHub Pages
checkout: true
setup-uv: true
task: docs
install: true
github-token: ${{ secrets.GITHUB_TOKEN }}
args: build
- name: Publish Docs
uses: juftin/actions/github-pages@v1
id: deployment
uses: actions/deploy-pages@v4
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json

name: test

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
pull-requests: write
steps:
- name: test
uses: juftin/actions/taskfile@v1
with:
checkout: true
setup-uv: true
task: test
install: true
github-token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 0 additions & 32 deletions .github/workflows/tests.yaml

This file was deleted.

40 changes: 21 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
default_stages: [commit]
fail_fast: false
# yaml-language-server: $schema=https://schemastore.org/pre-commit-config.json

exclude: |
(?x)(
{{cookiecutter.repo_name}}/|
test/example-project/
tests/example-project/
)

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -18,27 +19,28 @@ repos:
- id: check-merge-conflict
- id: mixed-line-ending

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
args: [--print-width=88, --tab-width=4]
exclude: |
(?x)(
.github/semantic_release/release_notes.hbs
)
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.11.0
hooks:
- id: pretty-format-toml
args: [--autofix]
args: [--autofix, --no-sort]

- repo: local
hooks:
- id: test
name: test
description: Runs Unit Tests
entry: hatch run test
- id: uv-lock
name: uv-lock
description: Runs uv lock when pyproject.toml changes
entry: uv lock
language: system
pass_filenames: false
require_serial: false
files: pyproject.toml
- id: prettier
name: prettier
description: Runs Prettier Code Formatter
entry: prettier --write --ignore-unknown
args: ["--tab-width=4"]
language: node
types:
- text
additional_dependencies:
- [email protected]
18 changes: 17 additions & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,21 @@
"prerelease": true
}
],
"plugins": ["semantic-release-gitmoji", "@semantic-release/github"]
"plugins": [
"semantic-release-gitmoji",
[
"@semantic-release/exec",
{
"prepareCmd": "uv version ${nextRelease.version} && uv build"
}
],
[
"@semantic-release/git",
{
"assets": ["pyproject.toml", "uv.lock"],
"message": "🔖 cookiecutter-python ${nextRelease.version}\n\n${nextRelease.notes}\n[skip ci]"
}
],
"@semantic-release/github"
]
}
Loading