Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
William Bakst committed May 24, 2024
1 parent daeb430 commit 667c20d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: release
run-name: ${{ github.actor }} is uploading a new release to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set Up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install Poetry
uses: snok/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"

- name: Get release version
run: echo "RELEASE_VERSION=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV

- name: Build And Publish Python Package
run: poetry publish --build
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 667c20d

Please sign in to comment.