Skip to content

Commit

Permalink
chore: publish to pypi through GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Sep 1, 2024
1 parent 329516b commit 1aee453
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,48 @@ on:
- '*'

jobs:
build:
name: build dist files
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'poetry'
- name: build dist
run: poetry build
- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

release:
name: create Github release
runs-on: ubuntu-latest
steps:
- uses: softprops/action-gh-release@v2

publish:
name: release to pypi
needs: build
runs-on: ubuntu-latest

environment:
name: pypi-release
url: https://pypi.org/project/scim2-models/
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 1aee453

Please sign in to comment.