Skip to content

Commit

Permalink
Merge pull request #5 from tzoiker/ci/publish
Browse files Browse the repository at this point in the history
Add publish job
  • Loading branch information
tzoiker authored Nov 2, 2023
2 parents d6a0531 + ae888ad commit 40a286a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish

on:
push:
tags:
- v*

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Setup python3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Fetch tags
run: git fetch --unshallow --tags || true

- name: Install poetry
run: python -m pip install poetry

- name: Install poem-plugins
run: poetry self add poem-plugins

- name: Install package
run: poetry install

- name: Mint token
id: mint
uses: tschm/[email protected]

- name: Publish to PyPI
run: poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}'
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ provider = "git"
update_pyproject = true

[tool.poem-plugins.version.git]
version_prefix = "v"
format = "long"

[tool.mypy]
Expand Down

0 comments on commit 40a286a

Please sign in to comment.