Skip to content

Commit

Permalink
Add release workflow for publishing package to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
vadim-su committed Jan 17, 2024
1 parent 59e6aee commit d76070b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish package to PyPI

on:
push:
tags:
- v*
workflow_dispatch:

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- name: Run tests
uses: ./.github/actions/tests

- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.12"
cache: true

- name: Publish package distributions to PyPI
run: pdm publish
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ concurrency:
cancel-in-progress: true

jobs:
code_analysis:
code-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Analyze code
uses: chartboost/ruff-action@v1

Expand Down

0 comments on commit d76070b

Please sign in to comment.