Skip to content

Commit

Permalink
Add workflow to Release on PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
estyxx committed May 20, 2024
1 parent 447cc1f commit ea855e8
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish to PyPI

on:
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
publish-library:
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/italia

permissions:
id-token: write

steps:
- uses: actions/checkout@v4

- uses: pdm-project/setup-pdm@v4
name: Setup Python and PDM
with:
python-version: "3.12"
cache: true

- name: Install dependencies
run: |
pdm install
- name: Ensure lock file is up to date
run: |
pdm lock --check
- name: Install dependencies
run: |
pdm sync -d
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit ea855e8

Please sign in to comment.