Skip to content

Commit

Permalink
Add publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Oct 18, 2023
1 parent 1639259 commit b11c5b2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10-dev

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install Dependencies
run: poetry install

- name: Build package
run: poetry build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.6"
description = "API client for Truth Social"
authors = ["R. Miles McCain <github@sendmiles.email>"]
license = "Apache 2.0"
readme = "README.md"

[tool.poetry.scripts]
truthbrush = "truthbrush.cli:cli"
Expand Down

0 comments on commit b11c5b2

Please sign in to comment.