Skip to content

Commit

Permalink
chore: add release job (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Sven Groot <sven@wearemoose.com>
  • Loading branch information
svengt and Sven Groot committed Dec 14, 2024
1 parent 192909f commit 8cce3e2
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
8 changes: 6 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Pytest

on: [push, pull_request]
on:
push:
branches-ignore:
- main
pull_request:
workflow_call:

env:
UV_SYSTEM_PYTHON: 1
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release
on:
push:
branches:
- main

jobs:
ruff:
name: ruff
uses: ./.github/workflows/ruff.yml
pytest:
name: pytest
uses: ./.github/workflows/pytest.yml
release:
name: Release
needs: [ruff, pytest]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
npx --package=semantic-release \
--package=@semantic-release/git \
--package=semantic-release-pypi \
semantic-release
8 changes: 7 additions & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Ruff
on: [ push, pull_request ]
on:
push:
branches-ignore:
- main
pull_request:
workflow_call:

jobs:
ruff:
runs-on: ubuntu-latest
Expand Down
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"semantic-release-pypi",
[
"@semantic-release/git",
{
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
"assets": ["pyproject.toml"]
}
]
],
"branches": ["main"]
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "django-ts-routes"
version = "0.1.0.dev0"
version = "0.1.0"
description = "Expose and perform reverse lookups of Django URLs in the TypeScript world."
readme = "README.md"
license = {text = "MIT"}
Expand Down

0 comments on commit 8cce3e2

Please sign in to comment.