Skip to content

Commit

Permalink
Adds publish workflow (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo authored Aug 14, 2023
1 parent b6d6606 commit aa009b2
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: πŸ› Publish to PyPi
on:
workflow_dispatch:
push:
tags:
- '*'

jobs:
build:
name: πŸ“¦ Build package
runs-on: ubuntu-latest
steps:
- name: πŸ“° Checkout
uses: actions/checkout@v3

- name: πŸ“² Setup PDM
uses: pdm-project/setup-pdm@v3
id: setup-python
with:
python-version: 3.x

- name: 🚚 Install dependencies
run: pdm install --prod

- name: πŸ—οΈ Build package
run: pdm build

- name: πŸ›« Export build files
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

publish:
name: πŸ—ž Publish package
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: πŸ›¬ Download artifacts
uses: actions/download-artifact@v3

- name: πŸ—ž Publish package
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit aa009b2

Please sign in to comment.