Skip to content

Commit

Permalink
feat (github): Action to automatically version package (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emrys-Merlin committed Sep 23, 2024
1 parent 1e63883 commit ded1535
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
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"

0 comments on commit ded1535

Please sign in to comment.