Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Aug 20, 2024
1 parent b7c3e1e commit 8e13292
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 68 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on: [workflow_dispatch]

jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Python Semantic Release
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
pip install -e .[dev]
- name: Run Semantic Release
run: make release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73 changes: 73 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "tutor-contrib-celery"
dynamic = ["version"]
description = "A Tutor plugin to manage our opinionated Open edX operations"
readme = "README.md"
requires-python = ">=3.8"
license = { text = "AGPLv3" }
authors = [
{ name = "eduNEXT" }
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"tutor>=18.0.0,<19.0.0"
]

optional-dependencies = { dev = ["python-semantic-release", "pylint", "black"]}

[project.urls]
Homepage = "https://github.com/edunext/tutor-contrib-celery"
Code = "https://github.com/edunext/tutor-contrib-celery"
"Issue tracker" = "https://github.com/edunext/tutor-contrib-celery/issues"

[tool.setuptools.packages.find]
where = ["."]
exclude = ["tests*"]

[project.entry-points."tutor.plugin.v1"]
celery = "tutorcelery.plugin"

[tool.setuptools.dynamic]
version = {attr = "tutorcelery.__about__.__version__"}

[tool.wheel]
universal = true

[tool.semantic_release]
commit_message = "chore(release): preparing {version}"
version_variables = [
"tutorcelery/__about__.py:__version__",
]

[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "rc"
prerelease = false

[tool.semantic_release.changelog.environment]
keep_trailing_newline = true

[tool.semantic_release.changelog]
exclude_commit_patterns = [
"docs:",
"build:",
"style:",
"chore:",
"test:",
"ci:",
]
68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

0 comments on commit 8e13292

Please sign in to comment.