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
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.26.2
_commit: v0.27.0
_src_path: .
copyright_holder: Stephen Kent
copyright_license: MIT
Expand Down
3 changes: 3 additions & 0 deletions .github/jactionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
profile: default
rules:
unpinned-uses: off
10 changes: 10 additions & 0 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,25 @@ on:
paths:
- uv.lock

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
audit:
name: Dependencies
runs-on: ubuntu-latest
timeout-minutes: 15
env:
UV_PYTHON: '3.15'
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
persist-credentials: false

- name: 📦 Cache uv managed packages
uses: actions/cache@v6
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand All @@ -14,6 +17,7 @@ jobs:
ci:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 15
env:
UV_PYTHON: ${{ matrix.python-version }}
strategy:
Expand All @@ -30,6 +34,7 @@ jobs:
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: 🪪 Configure git identity for tests
run: |
Expand Down Expand Up @@ -71,13 +76,15 @@ jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 15
env:
UV_PYTHON: '3.15'
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: 📦 Cache uv managed packages
uses: actions/cache@v6
Expand All @@ -99,13 +106,13 @@ jobs:
betterleaks:
name: Secret scan
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 15
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: 📦 Cache uv managed packages
uses: actions/cache@v6
Expand All @@ -128,13 +135,13 @@ jobs:
name: Commit messages
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 15
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: ✉️ Check commit messages
uses: commit-check/commit-check-action@v2
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ on:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false

jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
timeout-minutes: 15
env:
UV_PYTHON: '3.15'
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false

- name: 📦 Cache uv managed packages
uses: actions/cache@v6
Expand Down Expand Up @@ -53,9 +53,16 @@ jobs:
name: Deploy Documentation
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
steps:
- name: 🚀 Deploy site
uses: actions/deploy-pages@v5
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,31 @@ on:
tags:
- v[0-9]*.[0-9]*

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false

permissions:
contents: read

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
cache-mode: none
timeout-minutes: 15
env:
UV_PYTHON: '3.15'
steps:
- name: 💾 Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: 📦 Cache uv managed packages
uses: actions/cache@v6
with:
path: ~/.cache/uv
key: uv-${{ runner.os }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-
persist-credentials: false

- name: 🍳 Set up mise
uses: jdx/mise-action@v5
with:
cache: true
install: true

- name: 📦 Build package
Expand All @@ -37,13 +38,15 @@ jobs:
- name: 🔼 Upload artifact
uses: actions/upload-artifact@v7
with:
if-no-files-found: error
name: dist
path: dist/

release:
name: Create GitHub release
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
steps:
Expand All @@ -54,15 +57,17 @@ jobs:
path: dist/

- name: 🏷️ Create GitHub release
run: gh release create ${{ github.ref_name }} dist/* --generate-notes
run: gh release create "${REF_NAME}" dist/* --generate-notes
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REF_NAME: ${{ github.ref_name }}

publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: pypi
url: https://pypi.org/project/copier-python/
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ repos:
entry: betterleaks git . --pre-commit --staged --redact
language: system
pass_filenames: false
- id: jactionlint
name: jactionlint
entry: jactionlint --fix
language: system
types:
- yaml
files: ^\.github/workflows/
- id: ruff
name: ruff
entry: uv run ruff check --fix
Expand Down
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ postinstall = [

[tools]
betterleaks = "latest"
jactionlint = "latest"
"pipx:copier" = "latest"
prek = "latest"
taplo = "latest"
Expand Down
Loading