0.1.2 #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
release: | |
types: [released] | |
permissions: read-all | |
jobs: | |
build: | |
name: Make pip packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the Git repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: Install build tool | |
run: pip install build | |
- name: Building package | |
run: python -m build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pip | |
path: dist/* | |
if-no-files-found: error | |
publish: | |
name: Publish to PyPi | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: github.repository == 'Eeems-Org/python-liboxide' && github.event_name == 'release' && startsWith(github.ref, 'refs/tags') | |
permissions: | |
id-token: write | |
environment: | |
name: pypi | |
url: https://pypi.org/p/liboxide | |
steps: | |
- name: Download pip packages | |
id: download | |
uses: actions/download-artifact@v4 | |
with: | |
name: pip | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: ${{ steps.download.outputs.download-path }} |