Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action to automatically version package #10

Merged
merged 1 commit into from
Sep 23, 2024
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
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release a new version

on:
push:
branches:
- main

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

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

- name: Python semantic release
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@ Documentation = "https://Emrys-Merlin.github.io/web_watchr/"
Repository = "https://github.com/Emrys-Merlin/web_watchr.git"
"Bug Tracker" = "https://github.com/Emrys-Merlin/web_watchr/issues"
# Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"

[tool.semantic_release]
version_variable = [
"src/web_watchr/__init__.py:__version__"
]
major_on_zero = true
branch = "main"
upload_to_PyPI = true
upload_to_release = true
build_command = "make setup && make build"