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
11 changes: 5 additions & 6 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ jobs:
run: |
just actionlint
render-and-check:
# ubuntu-latest includes Node, which markdownlint-cli2 needs
runs-on: ubuntu-latest
runs-on: ubuntu-slim
permissions:
contents: read
steps:
Expand All @@ -52,8 +51,8 @@ jobs:
- name: Render a project and run its checks
run: |
just check
# Same markdownlint-cli2 version as the VS Code markdownlint extension
# Same action pin as the template's python.yml
- name: Markdownlint
working-directory: _rendered/demo-project
run: |
npx --yes markdownlint-cli2@0.23.2 "**/*.md"
uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
with:
globs: _rendered/demo-project/**/*.md
2 changes: 1 addition & 1 deletion template/.github/workflows/python.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
persist-credentials: false
# Keep markdownlint-cli2 in step with the VS Code markdownlint extension
- name: Markdownlint
uses: DavidAnson/markdownlint-cli2-action@21c1be1b93ad9ed58fa840aacc3f279cde2a72ff # v24.2.0
uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0
with:
globs: "**/*.md"
{%- endraw %}
15 changes: 10 additions & 5 deletions template/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ jobs:
id: commit
env:
TAG: ${{ steps.drafter.outputs.tag_name }}
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pyproject.toml uv.lock
git commit -m "Release $TAG"
git push origin main
# Skip the commit when pyproject.toml already has the release version
if ! git diff --quiet -- pyproject.toml uv.lock; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add pyproject.toml uv.lock
git commit -m "Release $TAG"
# Checkout doesn't persist credentials, so authenticate the push explicitly
git push "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:main
fi
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Publish release
Expand Down
Loading