-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from RDFLib/feat/supermodel
Add release workflow
- Loading branch information
Showing
3 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Release to PyPI | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
PYTHON_VERSION: "3.12" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@v4 | ||
with: | ||
# Required by WyriHaximus/github-action-get-previous-tag | ||
fetch-depth: 0 | ||
|
||
- name: Get latest tag | ||
id: latest-tag | ||
uses: WyriHaximus/github-action-get-previous-tag@v1 | ||
with: | ||
fallback: "0.1.0" | ||
|
||
- name: Tag starts with v | ||
id: tag-starts-with-v | ||
if: ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }} | ||
uses: mad9000/actions-find-and-replace-string@2 | ||
with: | ||
source: ${{ steps.latest-tag.outputs.tag }} | ||
find: "v" | ||
replace: "" | ||
|
||
- name: Tag value | ||
id: version | ||
uses: haya14busa/action-cond@v1 | ||
with: | ||
cond: ${{ startsWith(steps.latest-tag.outputs.tag, 'v') }} | ||
if_true: ${{ steps.tag-starts-with-v.outputs.value }} | ||
if_false: ${{ steps.latest-tag.outputs.tag }} | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install Python Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Install project | ||
run: | | ||
poetry install | ||
- name: Publish to PyPI | ||
run: | | ||
poetry version ${{ steps.version.outputs.value }} | ||
poetry build | ||
poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
__version__ = "3.0.6a" | ||
import pkg_resources | ||
|
||
version = pkg_resources.get_distribution("pylode").version | ||
__version__ = version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pylode" | ||
version = "3.0.6a" | ||
version = "3.1.0a" | ||
description = "An OWL ontology documentation tool using Python, based on LODE." | ||
authors = ["Nicholas Car <[email protected]>"] | ||
readme = "README.rst" | ||
|