Skip to content

Commit

Permalink
feat: add publish job
Browse files Browse the repository at this point in the history
  • Loading branch information
tzoiker committed Nov 2, 2023
1 parent d6a0531 commit 47bca9b
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 47bca9b

Please sign in to comment.