Skip to content

Commit

Permalink
chore: Add semantic-release process (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
crccheck authored Sep 8, 2023
1 parent 9064e17 commit 4908db4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
# workflow_dispatch:
push:
branches:
- master

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

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
# https://github.com/python-semantic-release/python-semantic-release/releases
uses: python-semantic-release/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ project_runpy
:target: https://github.com/crccheck/project_runpy/actions/workflows/ci.yaml

Generic helpers I wish existed or am constantly copying into my Python projects.
This is also my test project for random processes.


``env``
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ skip_covered = true

[tool.ruff]
line-length = 100

[tool.semantic_release]
version_variables = ["project_runpy/__init__.py:__version__"]
build_command = "pip install flit && flit build"

0 comments on commit 4908db4

Please sign in to comment.